Skip to contentSkip to conversation

reversed logic in disconnect testing of hiddev

PATCH Applied Oliver Neukum 2 participants 2 messages Jan 28, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reversed logic in disconnect testing of hiddev

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

Hi,

this should go into the next rc of 2.6.29

Regards
Oliver

---

drivers/hid/usbhid/hiddev.c renamed from drivers/hid/usbhid/hiddev.c.alt +1 -1
@@ -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;