提交 4d8f727b 编写于 作者: D Dan Carpenter 提交者: Dmitry Torokhov

Input: nomadik-ske-keypad - fix a loop timeout test

The loop exits with "timeout" set to -1 not to 0.

Fixes: 1158f0f1 ("Input: add support for Nomadik SKE keypad controller")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 0832e936
......@@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(struct ske_keypad *keypad)
while ((readl(keypad->reg_base + SKE_RIS) != 0x00000000) && timeout--)
cpu_relax();
if (!timeout)
if (timeout == -1)
return -EINVAL;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册