aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/m88ds3103.c
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-02-01 12:58:28 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-12 08:04:52 -0300
commit2f9dff3f39f0d6dac9209e2267517aebc1c6f86c (patch)
tree14446f3db5c3ddf8b011aa4f998deb65adf262b0 /drivers/media/dvb-frontends/m88ds3103.c
parent8a648fbbc1a1a3b4b500c63b5a953397103dfe22 (diff)
[media] m88ds3103: possible uninitialized scalar variable
It was possible that tuner_frequency variable, used for carrier offset compensation, was uninitialized. That happens when tuner .get_frequency() callback is not defined. Currently that case is not possible as only used tuner has this callback. Coverity CID 1166057: Uninitialized scalar variable (UNINIT) Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/m88ds3103.c')
-rw-r--r--drivers/media/dvb-frontends/m88ds3103.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c
index c0a78d90b5eb..b8f8df073079 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/drivers/media/dvb-frontends/m88ds3103.c
@@ -271,6 +271,13 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)
ret = fe->ops.tuner_ops.get_frequency(fe, &tuner_frequency);
if (ret)
goto err;
+ } else {
+ /*
+ * Use nominal target frequency as tuner driver does not provide
+ * actual frequency used. Carrier offset calculation is not
+ * valid.
+ */
+ tuner_frequency = c->frequency;
}
/* reset */

Privacy Policy