summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarina Yankevich <k.yankevich@omp.ru>2024-02-16 19:01:10 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-10-12 16:28:24 +0200
commit45defa4578cc1599bdfe2dcb7b810eafd7df90f2 (patch)
tree0c7991ab6401793456405950487be8e7dc66e2a6
parent88785982a19daa765e30ab3a605680202cfaee4e (diff)
downloadlinux-45defa4578cc1599bdfe2dcb7b810eafd7df90f2.tar.gz
linux-45defa4578cc1599bdfe2dcb7b810eafd7df90f2.tar.bz2
linux-45defa4578cc1599bdfe2dcb7b810eafd7df90f2.zip
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>
-rw-r--r--drivers/media/tuners/tda18271-fe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/tuners/tda18271-fe.c b/drivers/media/tuners/tda18271-fe.c
index a7e721baaa99..3a3309bc0151 100644
--- a/drivers/media/tuners/tda18271-fe.c
+++ b/drivers/media/tuners/tda18271-fe.c
@@ -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;