Commit 41894b97 authored by Oliver Endriss's avatar Oliver Endriss Committed by Mauro Carvalho Chehab

V4L/DVB (13987): [STV090x] Quit processing if the tuner did not lock

Exit stv090x_algo() if the tuner did not lock. This might happen due to
missing signal or invalid/incomplete tuning parameters.
Signed-off-by: default avatarOliver Endriss <o.endriss@gmx.de>
Signed-off-by: default avatarManu Abraham <abraham.manu@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2c1f750b
...@@ -3256,21 +3256,21 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state) ...@@ -3256,21 +3256,21 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state)
msleep(50); msleep(50);
if (state->config->tuner_get_status) {
if (stv090x_i2c_gate_ctrl(fe, 1) < 0) if (stv090x_i2c_gate_ctrl(fe, 1) < 0)
goto err; goto err;
if (state->config->tuner_get_status) {
if (state->config->tuner_get_status(fe, &reg) < 0) if (state->config->tuner_get_status(fe, &reg) < 0)
goto err_gateoff; goto err_gateoff;
} if (stv090x_i2c_gate_ctrl(fe, 0) < 0)
goto err;
if (reg) if (reg)
dprintk(FE_DEBUG, 1, "Tuner phase locked"); dprintk(FE_DEBUG, 1, "Tuner phase locked");
else else {
dprintk(FE_DEBUG, 1, "Tuner unlocked"); dprintk(FE_DEBUG, 1, "Tuner unlocked");
return STV090x_NOCARRIER;
if (stv090x_i2c_gate_ctrl(fe, 0) < 0) }
goto err; }
msleep(10); msleep(10);
agc1_power = MAKEWORD16(STV090x_READ_DEMOD(state, AGCIQIN1), agc1_power = MAKEWORD16(STV090x_READ_DEMOD(state, AGCIQIN1),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment