Input: nomadik-ske-keypad - Fix a loop timeout test
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/nomadik-ske-keypad.c +1 -1
@@ -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 ;/*
Signature · 1 line
2.17.1
Quoted 4 lines · Dan Carpenter
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 <[email protected]>
Applied, thank you.
Quoted 20 lines
--- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/input/keyboard/nomadik-ske-keypad.c +1
-1@@ -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 ;/* Signature · 1 line
2.17.1
Signature · 1 line
Dmitry