diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-01-28 03:36:18 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-01-29 05:23:12 -0500 |
commit | be5d0c837cf8e43458c5757be5df4837a2803d08 (patch) | |
tree | 7333ccb5b06f90d26807207055d0a57dfd8ac1ba /drivers/hid | |
parent | 0fb21de0799a985d2da3da14ae5625d724256638 (diff) |
HID: fix reversed logic in disconnect testing of hiddev
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index d73eea382ab3..4940e4d70c2d 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -656,7 +656,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
656 | 656 | ||
657 | case HIDIOCGSTRING: | 657 | case HIDIOCGSTRING: |
658 | mutex_lock(&hiddev->existancelock); | 658 | mutex_lock(&hiddev->existancelock); |
659 | if (!hiddev->exist) | 659 | if (hiddev->exist) |
660 | r = hiddev_ioctl_string(hiddev, cmd, user_arg); | 660 | r = hiddev_ioctl_string(hiddev, cmd, user_arg); |
661 | else | 661 | else |
662 | r = -ENODEV; | 662 | r = -ENODEV; |