bcm2835_pinctrl_probe: WARNING: CPU: 0 PID: 1 at kernel/irq/chip.c:850

Linus Walleij linus.walleij at linaro.org
Wed Jun 21 09:40:02 PDT 2017


On Tue, Jun 20, 2017 at 6:51 PM, Stefan Wahren <stefan.wahren at i2se.com> wrote:

> thanks, but it seems more trivial. The return value of irq_of_parse_and_map() wasn't check before calling gpiochip_set_chained_irqchip().
>
> So this change (similar to a downstream patch) avoid this warning:
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 1eb7a1a..2a29128 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -1048,6 +1048,10 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
>         for (i = 0; i < BCM2835_NUM_IRQS; i++) {
>                 pc->irq[i] = irq_of_parse_and_map(np, i);
>                 pc->irq_group[i] = i;
> +
> +               if (pc->irq[i] == 0)
> +                       continue;
> +

Oh that looks right.

Please submit a patch to me so I can apply it!

Yours,
Linus Walleij



More information about the linux-rpi-kernel mailing list