summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hw/input/ps2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 7c7a158e31..5cf95b4dd3 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -520,7 +520,9 @@ uint32_t ps2_read_data(PS2State *s)
         /* reading deasserts IRQ */
         s->update_irq(s->update_arg, 0);
         /* reassert IRQs if data left */
-        s->update_irq(s->update_arg, q->count != 0);
+        if (q->count) {
+            s->update_irq(s->update_arg, 1);
+        }
     }
     return val;
 }