Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce6c1cd2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij
Browse files

pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()



There is a signedness bug here so the loop will never exit.

Fixes: 8bfcbbbc ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a898c835
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;