aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichal Suchanek2019-08-18 10:55:24 +0200
committermarex2019-09-11 10:11:29 +0200
commit3e816a2424c428f452f2003aff105511dc0cd9d4 (patch)
tree619cf048cac2890033bcf11e0f607935dce2edd7 /common
parent001c8ea94ae710d8340829237a7d788b25ce2ae7 (diff)
usb_kdb: only process events successfully received
Causes unbound key repeat on error otherwise. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Diffstat (limited to 'common')
-rw-r--r--common/usb_kbd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 38737374614..e0c1e6d2b79 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -340,10 +340,9 @@ static inline void usb_kbd_poll_for_event(struct usb_device *dev)
struct usb_kbd_pdata *data = dev->privptr;
/* Submit a interrupt transfer request */
- usb_submit_int_msg(dev, data->intpipe, &data->new[0], data->intpktsize,
- data->intinterval);
-
- usb_kbd_irq_worker(dev);
+ if (usb_submit_int_msg(dev, data->intpipe, &data->new[0],
+ data->intpktsize, data->intinterval) >= 0)
+ usb_kbd_irq_worker(dev);
#elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) || \
defined(CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE)
#if defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP)