Commit be5d0c83 authored by Oliver Neukum's avatar Oliver Neukum Committed by Jiri Kosina

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: default avatarOliver Neukum <oneukum@suse.de>
Tested-by: default avatarFolkert van Heusden <folkert@vanheusden.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 0fb21de0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment