Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140398
b: refs/heads/master
c: e43bd67
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Neukum authored and Jiri Kosina committed Mar 30, 2009
1 parent 0ddd133 commit 05e37f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f4303fb2ec68055e793b84887a7ae0f9ea7cc2d
refs/heads/master: e43bd67d721bccbfe144c0b586b0ab3a2a157968
5 changes: 5 additions & 0 deletions trunk/drivers/hid/usbhid/hiddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,16 +875,21 @@ int hiddev_connect(struct hid_device *hid, unsigned int force)
hiddev->hid = hid;
hiddev->exist = 1;

/* when lock_kernel() usage is fixed in usb_open(),
* we could also fix it here */
lock_kernel();
retval = usb_register_dev(usbhid->intf, &hiddev_class);
if (retval) {
err_hid("Not able to get a minor for this device.");
hid->hiddev = NULL;
unlock_kernel();
kfree(hiddev);
return -1;
} else {
hid->minor = usbhid->intf->minor;
hiddev_table[usbhid->intf->minor - HIDDEV_MINOR_BASE] = hiddev;
}
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit 05e37f1

Please sign in to comment.