[media] tuner-xc2028: unlock on error in xc2028_get_afc()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 21 Jul 2012 07:32:59 +0000 (04:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Jul 2012 23:37:19 +0000 (20:37 -0300)
We need to do a mutex_unlock(&priv->lock) before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/tuners/tuner-xc2028.c

index 9e60285..ea0550e 100644 (file)
@@ -978,7 +978,7 @@ static int xc2028_get_afc(struct dvb_frontend *fe, s32 *afc)
        /* Get AFC */
        rc = xc2028_get_reg(priv, XREG_FREQ_ERROR, &afc_reg);
        if (rc < 0)
-               return rc;
+               goto ret;
 
        *afc = afc_reg * 15625; /* Hz */