提交 ce6c1cd2 编写于 作者: D Dan Carpenter 提交者: Linus Walleij

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 a898c835
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册