]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: pca953x: fix wrong error probe return value
authorSascha Hauer <s.hauer@pengutronix.de>
Mon, 16 Jun 2025 13:45:03 +0000 (15:45 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 17 Jun 2025 09:06:59 +0000 (11:06 +0200)
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>
Fixes: c47f7ff0fe61 ("gpio: pca953x: Utilise dev_err_probe() where it makes sense")
Link: https://lore.kernel.org/r/20250616134503.1201138-1-s.hauer@pengutronix.de
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-pca953x.c

index b852e49976294a4859ed909f4fa715af2e48d549..e80a96f39788585b5107eb4b8d4a7888275852d5 100644 (file)
@@ -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;
 }