aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/usbhid/hiddev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c
index ff3c644888b1..4985f485932f 100644
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -923,10 +923,11 @@ void hiddev_disconnect(struct hid_device *hid)
923 usb_deregister_dev(usbhid->intf, &hiddev_class); 923 usb_deregister_dev(usbhid->intf, &hiddev_class);
924 924
925 if (hiddev->open) { 925 if (hiddev->open) {
926 mutex_unlock(&hiddev->existancelock);
926 usbhid_close(hiddev->hid); 927 usbhid_close(hiddev->hid);
927 wake_up_interruptible(&hiddev->wait); 928 wake_up_interruptible(&hiddev->wait);
928 } else { 929 } else {
930 mutex_unlock(&hiddev->existancelock);
929 kfree(hiddev); 931 kfree(hiddev);
930 } 932 }
931 mutex_unlock(&hiddev->existancelock);
932} 933}