From: Karina Yankevich Date: Fri, 16 Feb 2024 16:01:10 +0000 (+0300) Subject: media: tda18271: add missing result checking of tda18271_lookup_map() X-Git-Tag: v6.13-rc1~149^2~196 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=45defa4578cc1599bdfe2dcb7b810eafd7df90f2;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/tuners/tda18271-fe.c b/drivers/media/tuners/tda18271-fe.c index a7e721baaa997..3a3309bc01518 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;