* [PATCH] pwm: ab8500: Fix error code in probe()
@ 2023-05-22 11:07 Dan Carpenter
2023-05-22 13:35 ` Linus Walleij
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2023-05-22 11:07 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thierry Reding, Linus Walleij, linux-pwm, kernel-janitors
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>
---
drivers/pwm/pwm-ab8500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] pwm: ab8500: Fix error code in probe()
2023-05-22 11:07 [PATCH] pwm: ab8500: Fix error code in probe() Dan Carpenter
@ 2023-05-22 13:35 ` Linus Walleij
2023-06-14 6:30 ` Uwe Kleine-König
2023-06-23 14:51 ` Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2023-05-22 13:35 UTC (permalink / raw)
To: Dan Carpenter
Cc: Uwe Kleine-König, Thierry Reding, linux-pwm, kernel-janitors
On Mon, May 22, 2023 at 1:07 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> 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: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pwm: ab8500: Fix error code in probe()
2023-05-22 11:07 [PATCH] pwm: ab8500: Fix error code in probe() Dan Carpenter
2023-05-22 13:35 ` Linus Walleij
@ 2023-06-14 6:30 ` Uwe Kleine-König
2023-06-23 14:51 ` Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2023-06-14 6:30 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Thierry Reding, Linus Walleij, linux-pwm, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Hello Dan,
On Mon, May 22, 2023 at 02:07:42PM +0300, Dan Carpenter wrote:
> 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>
Thanks!
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] pwm: ab8500: Fix error code in probe()
2023-05-22 11:07 [PATCH] pwm: ab8500: Fix error code in probe() Dan Carpenter
2023-05-22 13:35 ` Linus Walleij
2023-06-14 6:30 ` Uwe Kleine-König
@ 2023-06-23 14:51 ` Thierry Reding
2 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2023-06-23 14:51 UTC (permalink / raw)
To: Uwe Kleine-König, Dan Carpenter
Cc: Linus Walleij, linux-pwm, kernel-janitors
On Mon, 22 May 2023 14:07:42 +0300, Dan Carpenter wrote:
> This code accidentally return positive EINVAL instead of negative
> -EINVAL.
>
>
Applied, thanks!
[1/1] pwm: ab8500: Fix error code in probe()
commit: cdcffafc4d845cc0c6392cba168c7a942734cce7
Best regards,
--
Thierry Reding <thierry.reding@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-23 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 11:07 [PATCH] pwm: ab8500: Fix error code in probe() Dan Carpenter
2023-05-22 13:35 ` Linus Walleij
2023-06-14 6:30 ` Uwe Kleine-König
2023-06-23 14:51 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).