Skip to content

Commit d460e9c

Browse files
Su HuiBartosz Golaszewski
authored andcommitted
gpio: mlxbf3: add an error code check in mlxbf3_gpio_probe
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: cd33f21 ("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>
1 parent 314c020 commit d460e9c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpio/gpio-mlxbf3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev)
215215
gs->gpio_clr_io + MLXBF_GPIO_FW_DATA_OUT_CLEAR,
216216
gs->gpio_set_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_SET,
217217
gs->gpio_clr_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_CLEAR, 0);
218+
if (ret)
219+
return dev_err_probe(dev, ret, "%s: bgpio_init() failed", __func__);
218220

219221
gc->request = gpiochip_generic_request;
220222
gc->free = gpiochip_generic_free;

0 commit comments

Comments
 (0)