summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-05-22 14:07:42 +0300
committerThierry Reding <thierry.reding@gmail.com>2023-06-23 16:43:49 +0300
commitcdcffafc4d845cc0c6392cba168c7a942734cce7 (patch)
treed16ac807f1bfb532a6ef6e577edc52a9dc051ccd /drivers/pwm
parentde0bb6a8883342c19a5d20f28d5430169f87373e (diff)
downloadlinux-cdcffafc4d845cc0c6392cba168c7a942734cce7.tar.xz
pwm: ab8500: Fix error code in probe()
This code accidentally return positive EINVAL instead of negative -EINVAL. Fixes: eb41f334589d ("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>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-ab8500.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
index 507ff0d5f7bd..583a7d69c741 100644
--- a/drivers/pwm/pwm-ab8500.c
+++ b/drivers/pwm/pwm-ab8500.c
@@ -190,7 +190,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