summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2017-08-12 13:30:59 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-27 06:57:33 -0400
commit9793e1d214dc62a2685fa33dd0dc59b7f5e838b6 (patch)
tree99803675afb1881602137d44bdcaec95f4c79392 /drivers/media
parentbe90cc8e4ac08bcb4ca517cd4ae25aa8441e2d88 (diff)
media: au0828: fix unbalanced lock/unlock in au0828_usb_probe
Call mutex_unlock and free dev on failure. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/au0828/au0828-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 739df61cec4f..cd363a2100d4 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -628,6 +628,8 @@ static int au0828_usb_probe(struct usb_interface *interface,
if (retval) {
pr_err("%s() au0282_dev_register failed to register on V4L2\n",
__func__);
+ mutex_unlock(&dev->lock);
+ kfree(dev);
goto done;
}