[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MdEN_xTm=LDkh7Hi08UnaEsVZT7B41WKf1XALxXBLvQBw@mail.gmail.com>
Date: Mon, 16 Jun 2025 16:18:58 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Sascha Hauer <s.hauer@...gutronix.de>
Cc: linux-gpio@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: pca953x: fix wrong error probe return value
On Mon, Jun 16, 2025 at 3:45 PM Sascha Hauer <s.hauer@...gutronix.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@...gutronix.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
Powered by blists - more mailing lists