summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-aspeed-sgpio.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-12-10 21:28:31 +0100
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2019-12-11 10:07:22 +0100
commit11e299de3aced4ea23a9fb1fef6c983c8d516302 (patch)
treee8c60f2a5660af917f2af4aac43a1ea98b539466 /drivers/gpio/gpio-aspeed-sgpio.c
parentbc7bc688366a4f2544699e40cce45393b7f24408 (diff)
gpio: aspeed: avoid return type warning
gcc has a hard time tracking whether BUG_ON(1) ends execution or not: drivers/gpio/gpio-aspeed-sgpio.c: In function 'bank_reg': drivers/gpio/gpio-aspeed-sgpio.c:112:1: error: control reaches end of non-void function [-Werror=return-type] Use the simpler BUG() that gcc knows cannot continue. Fixes: f8b410e3695a ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-aspeed-sgpio.c')
-rw-r--r--drivers/gpio/gpio-aspeed-sgpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-aspeed-sgpio.c b/drivers/gpio/gpio-aspeed-sgpio.c
index 7e99860ca447..8319812593e3 100644
--- a/drivers/gpio/gpio-aspeed-sgpio.c
+++ b/drivers/gpio/gpio-aspeed-sgpio.c
@@ -107,7 +107,7 @@ static void __iomem *bank_reg(struct aspeed_sgpio *gpio,
return gpio->base + bank->irq_regs + GPIO_IRQ_STATUS;
default:
/* acturally if code runs to here, it's an error case */
- BUG_ON(1);
+ BUG();
}
}