lirc_imon: do not leave imon_probe() with mutex held
commit b833d0df943d70682e288c38c96b8e7bfff4023a upstream. Commitaf8a819a25
("[media] lirc_imon: simplify error handling code") lost mutex_unlock(&context->ctx_lock), so imon_probe() exits with the context->ctx_lock mutex acquired. The patch adds mutex_unlock(&context->ctx_lock) back. Found by Linux Driver Verification project (linuxtesting.org). Fixes:af8a819a25
("[media] lirc_imon: simplify error handling code") Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
623770a962
commit
32f8815fca
1 changed files with 2 additions and 0 deletions
|
@ -885,12 +885,14 @@ static int imon_probe(struct usb_interface *interface,
|
|||
vendor, product, ifnum, usbdev->bus->busnum, usbdev->devnum);
|
||||
|
||||
/* Everything went fine. Just unlock and return retval (with is 0) */
|
||||
mutex_unlock(&context->ctx_lock);
|
||||
goto driver_unlock;
|
||||
|
||||
unregister_lirc:
|
||||
lirc_unregister_driver(driver->minor);
|
||||
|
||||
free_tx_urb:
|
||||
mutex_unlock(&context->ctx_lock);
|
||||
usb_free_urb(tx_urb);
|
||||
|
||||
free_rx_urb:
|
||||
|
|
Loading…
Add table
Reference in a new issue