summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/au0828
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2017-08-12 19:30:59 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-27 12:57:33 +0200
commit9793e1d214dc62a2685fa33dd0dc59b7f5e838b6 (patch)
tree99803675afb1881602137d44bdcaec95f4c79392 /drivers/media/usb/au0828
parentmedia: dvb-usb: Add memory free on error path in dw2102_probe() (diff)
downloadlinux-9793e1d214dc62a2685fa33dd0dc59b7f5e838b6.tar.xz
linux-9793e1d214dc62a2685fa33dd0dc59b7f5e838b6.zip
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/usb/au0828')
-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;
}