Commit b55d996f authored by Oliver Neukum's avatar Oliver Neukum Committed by Dmitry Torokhov

Input: usbtouchscreen - initialize PM mutex before using it

Mutexes shall be initialized before they are used.

Fixes: 12e510db ("Input: usbtouchscreen - fix deadlock in autosuspend")
Reported-by: syzbot+199ea16c7f26418b4365@syzkaller.appspotmail.com
Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent e77ff779
...@@ -1659,6 +1659,8 @@ static int usbtouch_probe(struct usb_interface *intf, ...@@ -1659,6 +1659,8 @@ static int usbtouch_probe(struct usb_interface *intf,
if (!usbtouch || !input_dev) if (!usbtouch || !input_dev)
goto out_free; goto out_free;
mutex_init(&usbtouch->pm_mutex);
type = &usbtouch_dev_info[id->driver_info]; type = &usbtouch_dev_info[id->driver_info];
usbtouch->type = type; usbtouch->type = type;
if (!type->process_pkt) if (!type->process_pkt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment