Commit 11e299de authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Bartosz Golaszewski
Browse files

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: f8b410e3 ("gpio: aspeed-sgpio: Rename and add Kconfig/Makefile")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarAndrew Jeffery <andrew@aj.id.au>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent bc7bc688
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
	}
}