Skip to content

Commit cc8a9d7

Browse files
oneukumJiri Kosina
authored andcommitted
HID: usbhid: discarded events don't abort idleness
If an event is discarded the device stays idle. Just reverse the order of check and marking busy. Found by code inspection. Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent dfa0c5f commit cc8a9d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/usbhid/hid-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ static void hid_irq_in(struct urb *urb)
274274

275275
switch (urb->status) {
276276
case 0: /* success */
277-
usbhid_mark_busy(usbhid);
278277
usbhid->retry_delay = 0;
279278
if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open)
280279
break;
280+
usbhid_mark_busy(usbhid);
281281
if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) {
282282
hid_input_report(urb->context, HID_INPUT_REPORT,
283283
urb->transfer_buffer,

0 commit comments

Comments
 (0)