Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209649
b: refs/heads/master
c: 7032269
h: refs/heads/master
i:
  209647: 0163d29
v: v3
  • Loading branch information
Chris Ball authored and Jiri Kosina committed Aug 13, 2010
1 parent 9dddcbc commit 9d0d6b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1778ca298b06ec86af5fc9603447c379cbfb477b
refs/heads/master: 7032269e87ade34cc12891675371fa2ac150a620
6 changes: 4 additions & 2 deletions trunk/drivers/hid/usbhid/hiddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct hiddev_list *list = file->private_data;
struct hiddev *hiddev = list->hiddev;
struct hid_device *hid = hiddev->hid;
struct usb_device *dev = hid_to_usb_dev(hid);
struct usb_device *dev;
struct hiddev_collection_info cinfo;
struct hiddev_report_info rinfo;
struct hiddev_field_info finfo;
Expand All @@ -601,9 +601,11 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
/* Called without BKL by compat methods so no BKL taken */

/* FIXME: Who or what stop this racing with a disconnect ?? */
if (!hiddev->exist)
if (!hiddev->exist || !hid)
return -EIO;

dev = hid_to_usb_dev(hid);

switch (cmd) {

case HIDIOCGVERSION:
Expand Down

0 comments on commit 9d0d6b7

Please sign in to comment.