Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;