]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
HID: fix reversed logic in disconnect testing of hiddev
authorOliver Neukum <oliver@neukum.org>
Wed, 28 Jan 2009 08:36:18 +0000 (09:36 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 29 Jan 2009 10:23:12 +0000 (11:23 +0100)
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>
drivers/hid/usbhid/hiddev.c

index d73eea382ab3879c93a0c74db2833d47ead87f6f..4940e4d70c2d1ef6ef02804cc45222c7e5201c60 100644 (file)
@@ -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;