]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: nuvoton: wpcm450: off by one in wpcm450_gpio_register()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 18 Mar 2022 07:11:31 +0000 (10:11 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 24 Mar 2022 19:10:32 +0000 (20:10 +0100)
commit3d25ad4273d269ba13fcc1956103acf71a36e1af
treeb6dc152532d16ef0e55e195b7968369b98b9dd6e
parent05e72220a770c092beb42eb0fab36f1b7031e58d
pinctrl: nuvoton: wpcm450: off by one in wpcm450_gpio_register()

The > WPCM450_NUM_BANKS should be >= or it leads to an out of bounds
access on the next line.

Fixes: 0d94878238da ("pinctrl: nuvoton: Add driver for WPCM450")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20220318071131.GA29472@kili
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/nuvoton/pinctrl-wpcm450.c