diff options
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 271578b85d9..4309c03038f 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -207,7 +207,8 @@ static int usbhid_restart_out_queue(struct usbhid_device *usbhid) | |||
207 | int kicked; | 207 | int kicked; |
208 | int r; | 208 | int r; |
209 | 209 | ||
210 | if (!hid) | 210 | if (!hid || test_bit(HID_RESET_PENDING, &usbhid->iofl) || |
211 | test_bit(HID_SUSPENDED, &usbhid->iofl)) | ||
211 | return 0; | 212 | return 0; |
212 | 213 | ||
213 | if ((kicked = (usbhid->outhead != usbhid->outtail))) { | 214 | if ((kicked = (usbhid->outhead != usbhid->outtail))) { |
@@ -245,7 +246,8 @@ static int usbhid_restart_ctrl_queue(struct usbhid_device *usbhid) | |||
245 | int r; | 246 | int r; |
246 | 247 | ||
247 | WARN_ON(hid == NULL); | 248 | WARN_ON(hid == NULL); |
248 | if (!hid) | 249 | if (!hid || test_bit(HID_RESET_PENDING, &usbhid->iofl) || |
250 | test_bit(HID_SUSPENDED, &usbhid->iofl)) | ||
249 | return 0; | 251 | return 0; |
250 | 252 | ||
251 | if ((kicked = (usbhid->ctrlhead != usbhid->ctrltail))) { | 253 | if ((kicked = (usbhid->ctrlhead != usbhid->ctrltail))) { |