[patch]reversed logic in disconnect testing of hiddev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The logic for testing for disconnection is reversed in an ioctl leading
to false reports of disconnection.

Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
Tested-by: Folkert van Heusden <folkert@xxxxxxxxxxxxxx>

Hi,

this should go into the next rc of 2.6.29

	Regards
		Oliver

---

--- linux-2.6/drivers/hid/usbhid/hiddev.c.alt	2009-01-26 20:03:10.000000000 +0100
+++ linux-2.6/drivers/hid/usbhid/hiddev.c	2009-01-26 20:03:17.000000000 +0100
@@ -656,7 +656,7 @@ static long hiddev_ioctl(struct file *fi
 
 	case HIDIOCGSTRING:
 		mutex_lock(&hiddev->existancelock);
-		if (!hiddev->exist)
+		if (hiddev->exist)
 			r = hiddev_ioctl_string(hiddev, cmd, user_arg);
 		else
 			r = -ENODEV;
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux