media: tda18271: add missing result checking of tda18271_lookup_map()

tda18271_lookup_map() may return negative error code, but
tda18271c2_rf_tracking_filters_correction() doesn't check it
as the other callers.

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Signed-off-by: Karina Yankevich <k.yankevich@omp.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Karina Yankevich 2024-02-16 19:01:10 +03:00 committed by Hans Verkuil
parent 88785982a1
commit 45defa4578

View File

@ -279,7 +279,9 @@ static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe,
if (approx > 255)
approx = 255;
tda18271_lookup_map(fe, RF_CAL_DC_OVER_DT, &freq, &dc_over_dt);
ret = tda18271_lookup_map(fe, RF_CAL_DC_OVER_DT, &freq, &dc_over_dt);
if (tda_fail(ret))
goto fail;
/* calculate temperature compensation */
rfcal_comp = dc_over_dt * (s32)(tm_current - priv->tm_rfcal) / 1000;