Skip to contentSkip to conversation

xc5000: unlock on error in

PATCH New Dan Carpenter 1 participant 1 message Nov 30, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xc5000: unlock on error in

We recently added locking to this function, but we missed an error path which needs an unlock.

drivers/media/common/tuners/xc5000.c +2 -1
index 048f489..a3fcc59 100644
@@ -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;