diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-12-21 00:38:30 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-29 10:24:07 +0100 |
commit | ecda57f33e36c43da1866056b5d00bd7b99e20ce (patch) | |
tree | 84df1f8a1e8f0461167ed2fa40e0470d29732124 /drivers/input | |
parent | 4d38661dcbb1e96f11d34b3b4130bd7b6639ccc4 (diff) | |
download | linux-rt-ecda57f33e36c43da1866056b5d00bd7b99e20ce.tar.gz |
Input: nomadik-ske-keypad - fix a loop timeout test
[ Upstream commit 4d8f727b83bcd6702c2d210330872c9122d2d360 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/nomadik-ske-keypad.c | 2 |
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; /* |