]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
V4L/DVB (7839): tda18271: abort rf band calibration loop on errors
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 4 May 2008 20:54:23 +0000 (17:54 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 14 May 2008 05:54:04 +0000 (02:54 -0300)
Abort rf band calibration loop for the TDA18271HD/C2 if an error is detected.

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 d4fdcd4a0e0659268f88f7cafa822876d531fc24..3f7ca45bba9b1fab7d9b5a17a9adf43d8b00b3e2 100644 (file)
@@ -605,9 +605,13 @@ static int tda18271_calc_rf_filter_curve(struct dvb_frontend *fe)
                goto fail;
 
        /* rf band calibration */
-       for (i = 0; priv->rf_cal_state[i].rfmax != 0; i++)
+       for (i = 0; priv->rf_cal_state[i].rfmax != 0; i++) {
+               ret =
                tda18271_rf_tracking_filters_init(fe, 1000 *
                                                  priv->rf_cal_state[i].rfmax);
+               if (ret < 0)
+                       goto fail;
+       }
 
        priv->tm_rfcal = tda18271_read_thermometer(fe);
 fail:
@@ -640,7 +644,10 @@ static int tda18271c2_rf_cal_init(struct dvb_frontend *fe)
        tda_info("tda18271: RF tracking filter calibration complete\n");
 
        priv->cal_initialized = true;
+       goto end;
 fail:
+       tda_info("tda18271: RF tracking filter calibration failed!\n");
+end:
        return ret;
 }