Skip to content

Commit ce28f98

Browse files
arndbgregkh
authored andcommitted
gpio: aspeed: avoid return type warning
[ Upstream commit 11e299d ] 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: f8b410e ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 60d671d commit ce28f98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpio/sgpio-aspeed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static void __iomem *bank_reg(struct aspeed_sgpio *gpio,
107107
return gpio->base + bank->irq_regs + GPIO_IRQ_STATUS;
108108
default:
109109
/* acturally if code runs to here, it's an error case */
110-
BUG_ON(1);
110+
BUG();
111111
}
112112
}
113113

0 commit comments

Comments
 (0)