Commit 48659227 authored by Chris Packham's avatar Chris Packham Committed by Linus Walleij

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: 6f265e5d ("pinctrl: bcm-iproc: Pass irqchip when adding gpiochip")
Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20191003000310.17099-2-chris.packham@alliedtelesis.co.nzAcked-by: default avatarScott Branden <scott.branden@broadcom.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 39b65fbb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment