Skip to contentSkip to conversation

Input: usbtouchscreen - double lock typo in usbtouch_close(()

PATCH New Dan Carpenter 1 participant 1 message Mar 19, 2018

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

PATCH 1/1 Input: usbtouchscreen - double lock typo in usbtouch_close(()

There is a typo so we deadlock here instead of unlocking.

Fixes 5648f00809c3 ("Input: usbtouchscreen - fix deadlock in autosuspend")
drivers/input/touchscreen/usbtouchscreen.c +1 -1
index 4ae1cbf9e858..c6cf90868503 100644
@@ -1479,7 +1479,7 @@ static void usbtouch_close(struct input_dev *input)
 	if (!usbtouch->type->irq_always)
 		usb_kill_urb(usbtouch->irq);
 	usbtouch->is_open = false;
-	mutex_lock(&usbtouch->pm_mutex);
+	mutex_unlock(&usbtouch->pm_mutex);
 
 	r = usb_autopm_get_interface(usbtouch->interface);
 	usbtouch->interface->needs_remote_wakeup = 0;