aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2016-03-28 20:25:29 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-05-09 12:20:42 -0400
commiteda220acd5f2cef789430110f66a74cb49309b68 (patch)
treed190469a12b7013b4aa2259982d6cc5bac767cae
parentc23ac90f78aa9190643c82c1975a0cfe480d7c60 (diff)
[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>
-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,
679 if (retval) { 679 if (retval) {
680 pr_err("%s() v4l2_device_register failed\n", 680 pr_err("%s() v4l2_device_register failed\n",
681 __func__); 681 __func__);
682 mutex_unlock(&dev->lock);
683 kfree(dev);
684 return retval; 682 return retval;
685 } 683 }
686 684
@@ -691,8 +689,6 @@ int au0828_v4l2_device_register(struct usb_interface *interface,
691 if (retval) { 689 if (retval) {
692 pr_err("%s() v4l2_ctrl_handler_init failed\n", 690 pr_err("%s() v4l2_ctrl_handler_init failed\n",
693 __func__); 691 __func__);
694 mutex_unlock(&dev->lock);
695 kfree(dev);
696 return retval; 692 return retval;
697 } 693 }
698 dev->v4l2_dev.ctrl_handler = &dev->v4l2_ctrl_hdl; 694 dev->v4l2_dev.ctrl_handler = &dev->v4l2_ctrl_hdl;