Message ID | 20191003000310.17099-2-chris.packham@alliedtelesis.co.nz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | pinctrl: iproc: improve error handling | expand |
Thanks for fix. On 2019-10-02 5:03 p.m., Chris Packham wrote: > 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> Acked-by: Scott Branden <scott.branden@broadcom.com> > --- > drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > index 6f7d3a2f2e97..8971fc54e974 100644 > --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > @@ -853,7 +853,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; >
On Thu, Oct 3, 2019 at 2:03 AM Chris Packham <chris.packham@alliedtelesis.co.nz> wrote: > 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> Patch applied for fixes. Yours, Linus Walleij
diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c index 6f7d3a2f2e97..8971fc54e974 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -853,7 +853,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;
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> --- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)