gpio: aspeed: avoid return type warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 10 Dec 2019 20:28:31 +0000 (21:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jan 2020 09:01:09 +0000 (10:01 +0100)
commitce28f9842d0e1d36a3c8891c4d46cc4c1d56940f
tree2553053a510f9ad913cd8f1ef1351204d5edf77d
parent60d671da2fa2e9505e560aef0ee510fc45fb4322
gpio: aspeed: avoid return type warning

[ Upstream commit 11e299de3aced4ea23a9fb1fef6c983c8d516302 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/sgpio-aspeed.c