summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/tuners/tda18271-fe.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-05-04 15:37:27 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2008-05-04 15:37:27 -0400
commit57729e354e389335c094defa1dc9978780438d74 (patch)
treea91983e9486077ec034cb08f7717b9a5bc276962 /linux/drivers/media/common/tuners/tda18271-fe.c
parentd54a5aeffd20a5eb9c73e2aebe19c86499e0c6c7 (diff)
downloadmediapointer-dvb-s2-57729e354e389335c094defa1dc9978780438d74.tar.gz
mediapointer-dvb-s2-57729e354e389335c094defa1dc9978780438d74.tar.bz2
tda18271: fix error handling in tda18271_channel_configuration
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/common/tuners/tda18271-fe.c')
-rw-r--r--linux/drivers/media/common/tuners/tda18271-fe.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/linux/drivers/media/common/tuners/tda18271-fe.c b/linux/drivers/media/common/tuners/tda18271-fe.c
index 41a7798e0..15e2deb3f 100644
--- a/linux/drivers/media/common/tuners/tda18271-fe.c
+++ b/linux/drivers/media/common/tuners/tda18271-fe.c
@@ -52,6 +52,7 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
{
struct tda18271_priv *priv = fe->tuner_priv;
unsigned char *regs = priv->tda18271_regs;
+ int ret;
u32 N;
/* update TV broadcast parameters */
@@ -86,7 +87,9 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
/* update rf top / if top */
regs[R_EB22] = 0x00;
regs[R_EB22] |= map->rfagc_top;
- tda18271_write_regs(fe, R_EB22, 1);
+ ret = tda18271_write_regs(fe, R_EB22, 1);
+ if (ret < 0)
+ goto fail;
/* --------------------------------------------------------------- */
@@ -122,7 +125,9 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
/* agc1 has priority on agc2 */
regs[R_EB1] &= ~0x01;
- tda18271_write_regs(fe, R_EB1, 1);
+ ret = tda18271_write_regs(fe, R_EB1, 1);
+ if (ret < 0)
+ goto fail;
/* --------------------------------------------------------------- */
@@ -142,7 +147,9 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
break;
}
- tda18271_write_regs(fe, R_TM, 7);
+ ret = tda18271_write_regs(fe, R_TM, 7);
+ if (ret < 0)
+ goto fail;
/* force charge pump source */
charge_pump_source(fe, 1);
@@ -159,9 +166,9 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
regs[R_EP3] &= ~0x04;
else
regs[R_EP3] |= 0x04;
- tda18271_write_regs(fe, R_EP3, 1);
-
- return 0;
+ ret = tda18271_write_regs(fe, R_EP3, 1);
+fail:
+ return ret;
}
static int tda18271_read_thermometer(struct dvb_frontend *fe)
@@ -814,7 +821,7 @@ static int tda18271_tune(struct dvb_frontend *fe,
tda18271c2_rf_tracking_filters_correction(fe, freq);
break;
}
- tda18271_channel_configuration(fe, map, freq, bw);
+ ret = tda18271_channel_configuration(fe, map, freq, bw);
mutex_unlock(&priv->lock);
fail: