summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/bcm/pinctrl-bcm2835.c
diff options
context:
space:
mode:
authorJason Wang <wangborong@cdjrlc.com>2021-06-24 08:49:13 +0200
committerLinus Walleij <linus.walleij@linaro.org>2021-07-23 17:47:00 +0200
commit29d45a642d4ea8de7e89b57f856046df7c3b219f (patch)
treee7e21d3535508c794e5c3e93546711d92eff526c /drivers/pinctrl/bcm/pinctrl-bcm2835.c
parentpinctrl: qcom: Add MDM9607 pinctrl driver (diff)
downloadlinux-29d45a642d4ea8de7e89b57f856046df7c3b219f.tar.xz
linux-29d45a642d4ea8de7e89b57f856046df7c3b219f.zip
pinctrl: bcm2835: Replace BUG with BUG_ON
The if condition followed by BUG can be replaced to BUG_ON which is more compact and formal in linux source. Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20210624064913.41788-1-wangborong@cdjrlc.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/bcm/pinctrl-bcm2835.c')
-rw-r--r--drivers/pinctrl/bcm/pinctrl-bcm2835.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 2c87af1180c4..8440c722f6f8 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -416,8 +416,7 @@ static void bcm2835_gpio_irq_handler(struct irq_desc *desc)
}
}
/* This should not happen, every IRQ has a bank */
- if (i == BCM2835_NUM_IRQS)
- BUG();
+ BUG_ON(i == BCM2835_NUM_IRQS);
chained_irq_enter(host_chip, desc);