aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Neukum <[email protected]>2019-08-01 09:40:26 -0700
committerDmitry Torokhov <[email protected]>2019-08-01 10:55:20 -0700
commitb55d996f057bf2e7ba9422a80b5e17e99860cb0b (patch)
treef50fa96dd0577f8fefac7db47ee77f5eeaea1d8b
parente77ff779a0c6666b697c56a6e41972bbf30b977f (diff)
Input: usbtouchscreen - initialize PM mutex before using it
Mutexes shall be initialized before they are used. Fixes: 12e510dbc57b2 ("Input: usbtouchscreen - fix deadlock in autosuspend") Reported-by: [email protected] Signed-off-by: Oliver Neukum <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index a2cec6cacf57..16d70201de4a 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -1659,6 +1659,8 @@ static int usbtouch_probe(struct usb_interface *intf,
if (!usbtouch || !input_dev)
goto out_free;
+ mutex_init(&usbtouch->pm_mutex);
+
type = &usbtouch_dev_info[id->driver_info];
usbtouch->type = type;
if (!type->process_pkt)