Skip to content

Commit

Permalink
V4L/DVB (7839): tda18271: abort rf band calibration loop on errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed May 14, 2008
1 parent 24124f7 commit c151c32
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/media/common/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit c151c32

Please sign in to comment.