diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-05-04 18:57:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-05-14 01:54:05 -0400 |
commit | 20f4206379260e3ca02c8ee57bc3da9b0c7d09da (patch) | |
tree | 6dddf12d0c9d7f820eec81172de39f707a81603c /drivers/media | |
parent | 31940e3966b6cf3bb3e535ffa1cb97b16edd555b (diff) |
V4L/DVB (7842): tda18271: fix error handling in tda18271c2_rf_tracking_filters_correction
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/tuners/tda18271-fe.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c index 2c1bb380112d..8b44d4c62bfe 100644 --- a/drivers/media/common/tuners/tda18271-fe.c +++ b/drivers/media/common/tuners/tda18271-fe.c | |||
@@ -220,11 +220,13 @@ static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe, | |||
220 | struct tda18271_priv *priv = fe->tuner_priv; | 220 | struct tda18271_priv *priv = fe->tuner_priv; |
221 | struct tda18271_rf_tracking_filter_cal *map = priv->rf_cal_state; | 221 | struct tda18271_rf_tracking_filter_cal *map = priv->rf_cal_state; |
222 | unsigned char *regs = priv->tda18271_regs; | 222 | unsigned char *regs = priv->tda18271_regs; |
223 | int tm_current, rfcal_comp, approx, i; | 223 | int tm_current, rfcal_comp, approx, i, ret; |
224 | u8 dc_over_dt, rf_tab; | 224 | u8 dc_over_dt, rf_tab; |
225 | 225 | ||
226 | /* power up */ | 226 | /* power up */ |
227 | tda18271_set_standby_mode(fe, 0, 0, 0); | 227 | ret = tda18271_set_standby_mode(fe, 0, 0, 0); |
228 | if (ret < 0) | ||
229 | goto fail; | ||
228 | 230 | ||
229 | /* read die current temperature */ | 231 | /* read die current temperature */ |
230 | tm_current = tda18271_read_thermometer(fe); | 232 | tm_current = tda18271_read_thermometer(fe); |
@@ -257,9 +259,9 @@ static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe, | |||
257 | rfcal_comp = dc_over_dt * (tm_current - priv->tm_rfcal); | 259 | rfcal_comp = dc_over_dt * (tm_current - priv->tm_rfcal); |
258 | 260 | ||
259 | regs[R_EB14] = approx + rfcal_comp; | 261 | regs[R_EB14] = approx + rfcal_comp; |
260 | tda18271_write_regs(fe, R_EB14, 1); | 262 | ret = tda18271_write_regs(fe, R_EB14, 1); |
261 | 263 | fail: | |
262 | return 0; | 264 | return ret; |
263 | } | 265 | } |
264 | 266 | ||
265 | static int tda18271_por(struct dvb_frontend *fe) | 267 | static int tda18271_por(struct dvb_frontend *fe) |