Skip to content

Commit

Permalink
HID: fix reversed logic in disconnect testing of hiddev
Browse files Browse the repository at this point in the history
The logic for testing for disconnection is reversed in an ioctl leading
to false reports of disconnection.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Folkert van Heusden <folkert@vanheusden.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Oliver Neukum authored and Jiri Kosina committed Jan 29, 2009
1 parent 0fb21de commit be5d0c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/usbhid/hiddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

case HIDIOCGSTRING:
mutex_lock(&hiddev->existancelock);
if (!hiddev->exist)
if (hiddev->exist)
r = hiddev_ioctl_string(hiddev, cmd, user_arg);
else
r = -ENODEV;
Expand Down

0 comments on commit be5d0c8

Please sign in to comment.