mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
gpio: mlxbf3: add an error code check in mlxbf3_gpio_probe
[ Upstream commit d460e9c2075164e9b1fa9c4c95f8c05517bd8752 ]
Clang static checker warning: Value stored to 'ret' is never read.
bgpio_init() returns error code if failed, it's better to add this
check.
Fixes: cd33f216d2 ("gpio: mlxbf3: Add gpio driver support")
Signed-off-by: Su Hui <suhui@nfschina.com>
[Bartosz: add the Fixes: tag]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fd526aa39f
commit
52acfebcea
@@ -215,6 +215,8 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev)
|
||||
gs->gpio_clr_io + MLXBF_GPIO_FW_DATA_OUT_CLEAR,
|
||||
gs->gpio_set_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_SET,
|
||||
gs->gpio_clr_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_CLEAR, 0);
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "%s: bgpio_init() failed", __func__);
|
||||
|
||||
gc->request = gpiochip_generic_request;
|
||||
gc->free = gpiochip_generic_free;
|
||||
|
||||
Reference in New Issue
Block a user