summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/lm8333.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/lm8333.c')
-rw-r--r--drivers/input/keyboard/lm8333.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/lm8333.c b/drivers/input/keyboard/lm8333.c
index ca168a6679d..081fd9effa8 100644
--- a/drivers/input/keyboard/lm8333.c
+++ b/drivers/input/keyboard/lm8333.c
@@ -91,7 +91,7 @@ static void lm8333_key_handler(struct lm8333 *lm8333)
return;
}
- for (i = 0; keys[i] && i < LM8333_FIFO_TRANSFER_SIZE; i++) {
+ for (i = 0; i < LM8333_FIFO_TRANSFER_SIZE && keys[i]; i++) {
pressed = keys[i] & 0x80;
code = keys[i] & 0x7f;