pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()
Subsystems (4)
PATCH 1/1 pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()
There is a signedness bug here so the loop will never exit.
Fixes 8bfcbbbcabe0 ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')
Signed-off-by Dan Carpenter <[email protected]>
drivers/pinctrl/bcm/pinctrl-nsp-gpio.c +2 -1
@@ -439,9 +439,10 @@ static int nsp_gpio_set_strength(struct nsp_gpio *chip, unsigned gpio,static int nsp_gpio_get_strength (struct nsp_gpio *chip,unsigned gpio,u16 *strength) { -unsigned int i, offset, shift; +unsigned int offset, shift;u32 val;unsigned long flags; +int i; offset =NSP_GPIO_DRV_CTRL ; shift = gpio;
Quoted 4 lines · Dan Carpenter
There is a signedness bug here so the loop will never exit.
Fixes 8bfcbbbcabe0 ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')Signed-off-by Dan Carpenter <[email protected]>
Merry Christmas!
Patch applied.
Yours,
Linus Walleij