summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/nomadik-ske-keypad.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-12-21 11:38:30 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-12-21 11:52:37 +0300
commit4d8f727b83bcd6702c2d210330872c9122d2d360 (patch)
tree1505658250326c4ee9c5b35068930c0e11c76d99 /drivers/input/keyboard/nomadik-ske-keypad.c
parent0832e93632c61987d504e251b927a2be769dd21a (diff)
downloadlinux-4d8f727b83bcd6702c2d210330872c9122d2d360.tar.xz
Input: nomadik-ske-keypad - fix a loop timeout test
The loop exits with "timeout" set to -1 not to 0. Fixes: 1158f0f16224 ("Input: add support for Nomadik SKE keypad controller") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/nomadik-ske-keypad.c')
-rw-r--r--drivers/input/keyboard/nomadik-ske-keypad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c
index 8567ee47761e..ae3b04557074 100644
--- a/drivers/input/keyboard/nomadik-ske-keypad.c
+++ b/drivers/input/keyboard/nomadik-ske-keypad.c
@@ -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;
/*