gpio: nomadik: remove BUG_ON() in nmk_gpio_populate_chip()
Using BUG_ON() is discouraged and also the check wasn't done early enough to prevent an out of bounds access. Check earlier and return an error instead of calling BUG(). Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/ae643df0-3a3e-4270-8dbf-be390ee4b478@moroto.mountainSigned-off-by: Linus Walleij <linus.walleij@linaro.org>
Showing
Please register or sign in to comment