forked from Minki/linux
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>
This commit is contained in:
parent
0fb21de079
commit
be5d0c837c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user