linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: pca953x: fix wrong error probe return value
@ 2025-06-16 13:45 Sascha Hauer
  2025-06-16 14:18 ` Bartosz Golaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-06-16 13:45 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij, Bartosz Golaszewski, linux-kernel, Sascha Hauer

The second argument to dev_err_probe() is the error value. Pass the
return value of devm_request_threaded_irq() there instead of the irq
number.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/gpio/gpio-pca953x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index b852e49976294..e80a96f397885 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -974,7 +974,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
 					IRQF_ONESHOT | IRQF_SHARED, dev_name(dev),
 					chip);
 	if (ret)
-		return dev_err_probe(dev, client->irq, "failed to request irq\n");
+		return dev_err_probe(dev, ret, "failed to request irq\n");
 
 	return 0;
 }
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: pca953x: fix wrong error probe return value
  2025-06-16 13:45 [PATCH] gpio: pca953x: fix wrong error probe return value Sascha Hauer
@ 2025-06-16 14:18 ` Bartosz Golaszewski
  2025-06-16 14:31 ` Sascha Hauer
  2025-06-17  9:07 ` Bartosz Golaszewski
  2 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2025-06-16 14:18 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: linux-gpio, Linus Walleij, linux-kernel

On Mon, Jun 16, 2025 at 3:45 PM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> The second argument to dev_err_probe() is the error value. Pass the
> return value of devm_request_threaded_irq() there instead of the irq
> number.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  drivers/gpio/gpio-pca953x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index b852e49976294..e80a96f397885 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -974,7 +974,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
>                                         IRQF_ONESHOT | IRQF_SHARED, dev_name(dev),
>                                         chip);
>         if (ret)
> -               return dev_err_probe(dev, client->irq, "failed to request irq\n");
> +               return dev_err_probe(dev, ret, "failed to request irq\n");
>
>         return 0;
>  }
> --
> 2.39.5
>

Please add a Fixes tag, you don't have to resend, just post it as a reply.

Bart

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: pca953x: fix wrong error probe return value
  2025-06-16 13:45 [PATCH] gpio: pca953x: fix wrong error probe return value Sascha Hauer
  2025-06-16 14:18 ` Bartosz Golaszewski
@ 2025-06-16 14:31 ` Sascha Hauer
  2025-06-17  9:07 ` Bartosz Golaszewski
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-06-16 14:31 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij, Bartosz Golaszewski, linux-kernel

On Mon, Jun 16, 2025 at 03:45:03PM +0200, Sascha Hauer wrote:
> The second argument to dev_err_probe() is the error value. Pass the
> return value of devm_request_threaded_irq() there instead of the irq
> number.
>

Fixes: c47f7ff0fe61 ("gpio: pca953x: Utilise dev_err_probe() where it makes sense")

Sascha

> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  drivers/gpio/gpio-pca953x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index b852e49976294..e80a96f397885 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -974,7 +974,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
>  					IRQF_ONESHOT | IRQF_SHARED, dev_name(dev),
>  					chip);
>  	if (ret)
> -		return dev_err_probe(dev, client->irq, "failed to request irq\n");
> +		return dev_err_probe(dev, ret, "failed to request irq\n");
>  
>  	return 0;
>  }
> -- 
> 2.39.5
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpio: pca953x: fix wrong error probe return value
  2025-06-16 13:45 [PATCH] gpio: pca953x: fix wrong error probe return value Sascha Hauer
  2025-06-16 14:18 ` Bartosz Golaszewski
  2025-06-16 14:31 ` Sascha Hauer
@ 2025-06-17  9:07 ` Bartosz Golaszewski
  2 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2025-06-17  9:07 UTC (permalink / raw)
  To: linux-gpio, Sascha Hauer
  Cc: Bartosz Golaszewski, Linus Walleij, Bartosz Golaszewski,
	linux-kernel

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Mon, 16 Jun 2025 15:45:03 +0200, Sascha Hauer wrote:
> The second argument to dev_err_probe() is the error value. Pass the
> return value of devm_request_threaded_irq() there instead of the irq
> number.
> 
> 

Applied, thanks!

[1/1] gpio: pca953x: fix wrong error probe return value
      https://git.kernel.org/brgl/linux/c/0a1db19f66c0960eb00e1f2ccd40708b6747f5b1

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-17  9:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 13:45 [PATCH] gpio: pca953x: fix wrong error probe return value Sascha Hauer
2025-06-16 14:18 ` Bartosz Golaszewski
2025-06-16 14:31 ` Sascha Hauer
2025-06-17  9:07 ` Bartosz Golaszewski

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).