hid: fix incorrect return value for hid.
PATCH 1/1 hid: fix incorrect return value for hid.
The return value of hid_keyboard_write is used to set the packet's actual_length. Therefore, return 1 to indicate a successful transfer or it should be considered as a wrong xfer.
Signed-off-by ShengYi Hung <[email protected]>
Sponsored by: The FreeBSD Foundation
--- hw/input/hid.c | 1 + 1 file changed, 1 insertion(+)
hw/input/hid.c +1 -0
@@ -478,6 +478,7 @@ int hid_keyboard_write(HIDState *hs, uint8_t *buf, int len) ledstate |=QEMU_CAPS_LOCK_LED ; }kbd_put_ledstate (ledstate); +return (1 ); }return 0 ; }
Signature · 1 line
2.50.1