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: 6f265e5d4d
("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>
This commit is contained in:
Родитель
39b65fbb81
Коммит
48659227e0
|
@ -845,7 +845,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
/* optional GPIO interrupt support */
|
/* optional GPIO interrupt support */
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq) {
|
if (irq > 0) {
|
||||||
struct irq_chip *irqc;
|
struct irq_chip *irqc;
|
||||||
struct gpio_irq_chip *girq;
|
struct gpio_irq_chip *girq;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче