summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-11-01 22:06:01 +0100
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-11 19:04:52 +0100
commitab0625f021f83ecb19c969188ba2af3d154c054e (patch)
tree5a504a9fca6ae9e57e330d92203fce1acadb95b9
parentmedia: xc4000: don't ignore error if hwmodel fails (diff)
downloadlinux-ab0625f021f83ecb19c969188ba2af3d154c054e.tar.xz
linux-ab0625f021f83ecb19c969188ba2af3d154c054e.zip
media: stv090x: Only print tuner lock if get_status is available
The current code doesn't report tuner lock properly if the tuner get_status callback is not available, as reported by smatch: drivers/media/dvb-frontends/stv090x.c:2220 stv090x_get_coldlock() error: uninitialized symbol 'reg'. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/dvb-frontends/stv090x.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/dvb-frontends/stv090x.c b/drivers/media/dvb-frontends/stv090x.c
index 7ef469c0c866..0f375df13fbe 100644
--- a/drivers/media/dvb-frontends/stv090x.c
+++ b/drivers/media/dvb-frontends/stv090x.c
@@ -2215,13 +2215,12 @@ static int stv090x_get_coldlock(struct stv090x_state *state, s32 timeout_dmd)
if (state->config->tuner_get_status) {
if (state->config->tuner_get_status(fe, &reg) < 0)
goto err_gateoff;
+ if (reg)
+ dprintk(FE_DEBUG, 1, "Tuner phase locked");
+ else
+ dprintk(FE_DEBUG, 1, "Tuner unlocked");
}
- if (reg)
- dprintk(FE_DEBUG, 1, "Tuner phase locked");
- else
- dprintk(FE_DEBUG, 1, "Tuner unlocked");
-
if (stv090x_i2c_gate_ctrl(state, 0) < 0)
goto err;