]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7842): tda18271: fix error handling in tda18271c2_rf_tracking_filters_correction
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 4 May 2008 22:57:06 +0000 (19:57 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 14 May 2008 05:54:05 +0000 (02:54 -0300)
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/common/tuners/tda18271-fe.c

index 2c1bb380112d6f8277bfd76b5295ed1c4feb8399..8b44d4c62bfe5dc6340aa7129fa23bc4577988f5 100644 (file)
@@ -220,11 +220,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);
@@ -257,9 +259,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)