Skip to content

Commit 4d8f727

Browse files
Dan Carpenterdtor
authored andcommitted
Input: nomadik-ske-keypad - fix a loop timeout test
The loop exits with "timeout" set to -1 not to 0. Fixes: 1158f0f ("Input: add support for Nomadik SKE keypad controller") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 0832e93 commit 4d8f727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/nomadik-ske-keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(struct ske_keypad *keypad)
100100
while ((readl(keypad->reg_base + SKE_RIS) != 0x00000000) && timeout--)
101101
cpu_relax();
102102

103-
if (!timeout)
103+
if (timeout == -1)
104104
return -EINVAL;
105105

106106
/*

0 commit comments

Comments
 (0)