mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-16 07:35:14 +00:00
Input: nomadik-ske-keypad - fix a loop timeout test
[ Upstream commit4d8f727b83
] The loop exits with "timeout" set to -1 not to 0. Fixes:1158f0f162
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
43c3e95746
commit
15751bde70
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue