mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
gpio: mlxbf3: fail probe if gpiochip registration fails
[ Upstream commit0482862a90] mlxbf3_gpio_probe() logs a devm_gpiochip_add_data() failure but still returns success. That leaves the platform device bound even though the GPIO chip was not registered. Return the registration error so probe failure matches the missing gpiochip state. Fixes:cd33f216d2("gpio: mlxbf3: Add gpio driver support") Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260615091918.43333-1-pengpeng@iscas.ac.cn Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e1a215900d
commit
6564da2814
@@ -252,7 +252,8 @@ static int mlxbf3_gpio_probe(struct platform_device *pdev)
|
||||
|
||||
ret = devm_gpiochip_add_data(dev, &gs->gc, gs);
|
||||
if (ret)
|
||||
dev_err_probe(dev, ret, "Failed adding memory mapped gpiochip\n");
|
||||
return dev_err_probe(dev, ret,
|
||||
"Failed adding memory mapped gpiochip\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user