summaryrefslogtreecommitdiffstats
path: root/drivers/input/i8042.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/i8042.c')
-rw-r--r--drivers/input/i8042.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 4c887f4071..b1ada867e4 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -585,18 +585,17 @@ int i8042_kbd_init(void)
keymap = KBD_GER;
}
- for (try = 0; try < KBD_RESET_TRIES; try++) {
- if (kbd_reset() == 0) {
- kbd_mapping = keymap;
- kbd_flags = NORMAL;
- kbd_state = 0;
- kbd_led_set();
-
- return 0;
- }
+ for (try = 0; kbd_reset() != 0; try++) {
+ if (try >= KBD_RESET_TRIES)
+ return -1;
}
- return -1;
+ kbd_mapping = keymap;
+ kbd_flags = NORMAL;
+ kbd_state = 0;
+ kbd_led_set();
+
+ return 0;
}
/*