Skip to content

Commit

Permalink
pinctrl: sunxi: Mark the irq bank not found in sunxi_pinctrl_irq_hand…
Browse files Browse the repository at this point in the history
…ler() with WARN_ON

The interrupt descriptor cannot be found in the interrupt processing
function, and this situation cannot happen when the system is running
normally. It doesn't seem right to return directly to the status of not
handling gic. In this case, it must be a bug, let's mark it with
WARN_ON.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Link: https://lore.kernel.org/r/470ebae22fc5434ad5409c4f6e29255467b3cef6.1604988979.git.frank@allwinnertech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Yangtao Li authored and Linus Walleij committed Nov 24, 2020
1 parent 6de7ed6 commit fd5198d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pinctrl/sunxi/pinctrl-sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1139,8 +1139,7 @@ static void sunxi_pinctrl_irq_handler(struct irq_desc *desc)
if (irq == pctl->irq[bank])
break;

if (bank == pctl->desc->irq_banks)
return;
WARN_ON(bank == pctl->desc->irq_banks);

reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank);
val = readl(pctl->membase + reg);
Expand Down

0 comments on commit fd5198d

Please sign in to comment.