summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/au0828
diff options
context:
space:
mode:
authorShuah Khan2016-03-29 02:25:29 +0200
committerMauro Carvalho Chehab2016-05-09 18:20:42 +0200
commiteda220acd5f2cef789430110f66a74cb49309b68 (patch)
treed190469a12b7013b4aa2259982d6cc5bac767cae /drivers/media/usb/au0828
parent[media] c8sectpfe: Rework firmware loading mechanism (diff)
downloadkernel-qcow2-linux-eda220acd5f2cef789430110f66a74cb49309b68.tar.gz
kernel-qcow2-linux-eda220acd5f2cef789430110f66a74cb49309b68.tar.xz
kernel-qcow2-linux-eda220acd5f2cef789430110f66a74cb49309b68.zip
[media] media: au0828 fix au0828_v4l2_device_register() to not unlock and free
au0828_v4l2_device_register() unlocks au0828_dev->lock and frees au0828 dev in error legs before return. au0828_usb_probe() does the same when au0828_v4l2_device_register() returns error. Fix au0828_v4l2_device_register() to not to unlock and free in its error legs. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/au0828')
-rw-r--r--drivers/media/usb/au0828/au0828-video.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index 32d7db96479c..7d0ec4cb248c 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -679,8 +679,6 @@ int au0828_v4l2_device_register(struct usb_interface *interface,
if (retval) {
pr_err("%s() v4l2_device_register failed\n",
__func__);
- mutex_unlock(&dev->lock);
- kfree(dev);
return retval;
}
@@ -691,8 +689,6 @@ int au0828_v4l2_device_register(struct usb_interface *interface,
if (retval) {
pr_err("%s() v4l2_ctrl_handler_init failed\n",
__func__);
- mutex_unlock(&dev->lock);
- kfree(dev);
return retval;
}
dev->v4l2_dev.ctrl_handler = &dev->v4l2_ctrl_hdl;