summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/i8042/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers/i8042/keyboard.c')
-rw-r--r--payloads/libpayload/drivers/i8042/keyboard.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c
index a4f91b047a..a24d5a22cb 100644
--- a/payloads/libpayload/drivers/i8042/keyboard.c
+++ b/payloads/libpayload/drivers/i8042/keyboard.c
@@ -324,6 +324,9 @@ void keyboard_disconnect(void)
if (inb(0x64) == 0xFF)
return;
+ if (!i8042_has_ps2())
+ return;
+
/* Empty keyboard buffer */
while (keyboard_havechar())
keyboard_getchar();