mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
be90cc8e4a
commit
9793e1d214
|
@ -628,6 +628,8 @@ static int au0828_usb_probe(struct usb_interface *interface,
|
||||||
if (retval) {
|
if (retval) {
|
||||||
pr_err("%s() au0282_dev_register failed to register on V4L2\n",
|
pr_err("%s() au0282_dev_register failed to register on V4L2\n",
|
||||||
__func__);
|
__func__);
|
||||||
|
mutex_unlock(&dev->lock);
|
||||||
|
kfree(dev);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue