diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-20 18:38:23 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-20 18:38:23 +0300 |
commit | 2c271fe77d52a0555161926c232cd5bc07178b39 (patch) | |
tree | 6056fe8daa59d146125ad1e8cb5681f1c78fc1ff /drivers/gpio | |
parent | 64f29d8856a9e0d1fcdc5344f76e70c364b941cb (diff) | |
parent | 9f51ce0b9e73f83bab2442b36d5e247a81bd3401 (diff) | |
download | linux-2c271fe77d52a0555161926c232cd5bc07178b39.tar.xz |
Merge tag 'gpio-fixes-for-v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski:
"Fix the same error check issue in two drivers. And then the drivers
are fixed even more because the first patches were incomplete which I
missed.
Summary:
- fix the error checks of platform_get_irq() in gpio-mpc8xxx and
gpio-idt3243x"
* tag 'gpio-fixes-for-v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpio: mpc8xxx: Fix an ignored error return from platform_get_irq()
gpio: idt3243x: Fix an ignored error return from platform_get_irq()
gpio: idt3243x: Fix IRQ check in idt_gpio_probe
gpio: mpc8xxx: Fix IRQ check in mpc8xxx_probe
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-idt3243x.c | 6 | ||||
-rw-r--r-- | drivers/gpio/gpio-mpc8xxx.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-idt3243x.c b/drivers/gpio/gpio-idt3243x.c index 50003ad2e589..52b8b72ded77 100644 --- a/drivers/gpio/gpio-idt3243x.c +++ b/drivers/gpio/gpio-idt3243x.c @@ -132,7 +132,7 @@ static int idt_gpio_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct gpio_irq_chip *girq; struct idt_gpio_ctrl *ctrl; - unsigned int parent_irq; + int parent_irq; int ngpios; int ret; @@ -164,8 +164,8 @@ static int idt_gpio_probe(struct platform_device *pdev) return PTR_ERR(ctrl->pic); parent_irq = platform_get_irq(pdev, 0); - if (!parent_irq) - return -EINVAL; + if (parent_irq < 0) + return parent_irq; girq = &ctrl->gc.irq; girq->chip = &idt_gpio_irqchip; diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 70d6ae20b1da..a964e25ea620 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -47,7 +47,7 @@ struct mpc8xxx_gpio_chip { unsigned offset, int value); struct irq_domain *irq; - unsigned int irqn; + int irqn; }; /* @@ -388,8 +388,8 @@ static int mpc8xxx_probe(struct platform_device *pdev) } mpc8xxx_gc->irqn = platform_get_irq(pdev, 0); - if (!mpc8xxx_gc->irqn) - return 0; + if (mpc8xxx_gc->irqn < 0) + return mpc8xxx_gc->irqn; mpc8xxx_gc->irq = irq_domain_create_linear(fwnode, MPC8XXX_GPIO_PINS, |