mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 08:18:47 +00:00
[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>
This commit is contained in:
parent
c23ac90f78
commit
eda220acd5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user