[media] staging/media: lirc_imon: fix leaks in imon_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 3 Jun 2013 01:58:49 +0000 (22:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 17 Jun 2013 18:52:20 +0000 (15:52 -0300)
commite049ca5e854263c821a15c0e25fe2ae202c365e1
tree9cd30b2a350ef938323f87c7ced98411f5446066
parent07342664d3725de4b21478da222593da491afcd8
[media] staging/media: lirc_imon: fix leaks in imon_probe()

Error handling of usb_submit_urb() is not as all others in imon_probe().
It just unlocks mutexes and returns nonzero leaving all already
allocated resources unfreed.
The patch makes sure all the resources are deallocated.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/lirc/lirc_imon.c