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:
Gustavo A. R. Silva 2017-08-12 13:30:59 -04:00 committed by Mauro Carvalho Chehab
parent be90cc8e4a
commit 9793e1d214
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}