summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-idt3243x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-01-20 17:38:23 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-20 17:38:23 +0200
commit2c271fe77d52a0555161926c232cd5bc07178b39 (patch)
tree6056fe8daa59d146125ad1e8cb5681f1c78fc1ff /drivers/gpio/gpio-idt3243x.c
parent64f29d8856a9e0d1fcdc5344f76e70c364b941cb (diff)
parent9f51ce0b9e73f83bab2442b36d5e247a81bd3401 (diff)
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/gpio-idt3243x.c')
-rw-r--r--drivers/gpio/gpio-idt3243x.c6
1 files changed, 3 insertions, 3 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;