summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-05-04 15:57:06 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2008-05-04 15:57:06 -0400
commit2ba71a7d6966f5c647046c556d9bb6cb3145b5fd (patch)
tree171f6b8a568b3220ba774eb57f5f81f37b9a22fd /linux
parent57729e354e389335c094defa1dc9978780438d74 (diff)
downloadmediapointer-dvb-s2-2ba71a7d6966f5c647046c556d9bb6cb3145b5fd.tar.gz
mediapointer-dvb-s2-2ba71a7d6966f5c647046c556d9bb6cb3145b5fd.tar.bz2
tda18271: fix error handling in tda18271c2_rf_tracking_filters_correction
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/common/tuners/tda18271-fe.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/linux/drivers/media/common/tuners/tda18271-fe.c b/linux/drivers/media/common/tuners/tda18271-fe.c
index 15e2deb3f..e4fbbaa72 100644
--- a/linux/drivers/media/common/tuners/tda18271-fe.c
+++ b/linux/drivers/media/common/tuners/tda18271-fe.c
@@ -221,11 +221,13 @@ static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe,
struct tda18271_priv *priv = fe->tuner_priv;
struct tda18271_rf_tracking_filter_cal *map = priv->rf_cal_state;
unsigned char *regs = priv->tda18271_regs;
- int tm_current, rfcal_comp, approx, i;
+ int tm_current, rfcal_comp, approx, i, ret;
u8 dc_over_dt, rf_tab;
/* power up */
- tda18271_set_standby_mode(fe, 0, 0, 0);
+ ret = tda18271_set_standby_mode(fe, 0, 0, 0);
+ if (ret < 0)
+ goto fail;
/* read die current temperature */
tm_current = tda18271_read_thermometer(fe);
@@ -258,9 +260,9 @@ static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe,
rfcal_comp = dc_over_dt * (tm_current - priv->tm_rfcal);
regs[R_EB14] = approx + rfcal_comp;
- tda18271_write_regs(fe, R_EB14, 1);
-
- return 0;
+ ret = tda18271_write_regs(fe, R_EB14, 1);
+fail:
+ return ret;
}
static int tda18271_por(struct dvb_frontend *fe)