* [patch] [media] xc5000: unlock on error in
@ 2011-11-30 8:48 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-11-30 8:48 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Eddi De Pieri, Igor M. Liplianin,
Beholder Intl. Ltd. Dmitry Belimov, linux-media, kernel-janitors
We recently added locking to this function, but we missed an error path
which needs an unlock.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index 048f489..a3fcc59 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -1009,7 +1009,7 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe)
if (xc5000_is_firmware_loaded(fe) != XC_RESULT_SUCCESS) {
ret = xc5000_fwupload(fe);
if (ret != XC_RESULT_SUCCESS)
- return ret;
+ goto out;
}
/* Start the tuner self-calibration process */
@@ -1025,6 +1025,7 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe)
/* Default to "CABLE" mode */
ret |= xc_write_reg(priv, XREG_SIGNALSOURCE, XC_RF_MODE_CABLE);
+out:
mutex_unlock(&xc5000_list_mutex);
return ret;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-30 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30 8:48 [patch] [media] xc5000: unlock on error in Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox