From: Oliver Neukum Date: Wed, 28 Jan 2009 08:36:18 +0000 (+0100) Subject: HID: fix reversed logic in disconnect testing of hiddev X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=be5d0c837cf8e43458c5757be5df4837a2803d08;p=linux-2.6-omap-h63xx.git 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 Tested-by: Folkert van Heusden Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index d73eea382ab..4940e4d70c2 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) case HIDIOCGSTRING: mutex_lock(&hiddev->existancelock); - if (!hiddev->exist) + if (hiddev->exist) r = hiddev_ioctl_string(hiddev, cmd, user_arg); else r = -ENODEV;