提交 be5d0c83 编写于 作者: O Oliver Neukum 提交者: 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: NOliver Neukum <oneukum@suse.de>
Tested-by: NFolkert van Heusden <folkert@vanheusden.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册