1
0
Fork 0

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

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

Fixes: 8bfcbbbcab ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
steinar/wifi_calib_4_9_kernel
Dan Carpenter 2015-12-24 10:25:32 +03:00 committed by Linus Walleij
parent a898c8358a
commit ce6c1cd2c3
1 changed files with 2 additions and 1 deletions

View File

@ -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;