diff options
author | Chris Packham <chris.packham@alliedtelesis.co.nz> | 2019-10-03 13:03:09 +1300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-10-05 18:36:57 +0200 |
commit | 48659227e0a1d7897a4942c7b2cf925b581b6bf7 (patch) | |
tree | 5b8e78891dc57c4a5e5c689c014426aa5075b2fc /drivers/pinctrl | |
parent | 39b65fbb813089e366b376bd8acc300b6fd646dc (diff) | |
download | linux-stable-48659227e0a1d7897a4942c7b2cf925b581b6bf7.tar.gz linux-stable-48659227e0a1d7897a4942c7b2cf925b581b6bf7.tar.bz2 linux-stable-48659227e0a1d7897a4942c7b2cf925b581b6bf7.zip |
pinctrl: iproc: allow for error from platform_get_irq()
platform_get_irq() can return an error code. Allow for this when getting
the irq.
Fixes: 6f265e5d4da7 ("pinctrl: bcm-iproc: Pass irqchip when adding gpiochip")
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20191003000310.17099-2-chris.packham@alliedtelesis.co.nz
Acked-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c index 61352cc6c0d3..42f7ab383ad9 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -845,7 +845,7 @@ static int iproc_gpio_probe(struct platform_device *pdev) /* optional GPIO interrupt support */ irq = platform_get_irq(pdev, 0); - if (irq) { + if (irq > 0) { struct irq_chip *irqc; struct gpio_irq_chip *girq; |