mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
pwm: ab8500: Fix error code in probe()
[ Upstream commitcdcffafc4d] This code accidentally return positive EINVAL instead of negative -EINVAL. Fixes:eb41f33458("pwm: ab8500: Fix register offset calculation to not depend on probe order") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
05b35ea06d
commit
db3c7f3eb8
@@ -96,7 +96,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
|
||||
int err;
|
||||
|
||||
if (pdev->id < 1 || pdev->id > 31)
|
||||
return dev_err_probe(&pdev->dev, EINVAL, "Invalid device id %d\n", pdev->id);
|
||||
return dev_err_probe(&pdev->dev, -EINVAL, "Invalid device id %d\n", pdev->id);
|
||||
|
||||
/*
|
||||
* Nothing to be done in probe, this is required to get the
|
||||
|
||||
Reference in New Issue
Block a user