Skip to content
Commit 01a26ff9 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: tda8290: initialize agc gain



The tuning logic at tda8290 relies on agc_stat and
adc_sat to be initialized. However, as warned by smatch:

	drivers/media/tuners/tda8290.c:261 tda8290_set_params() error: uninitialized symbol 'agc_stat'.
	drivers/media/tuners/tda8290.c:261 tda8290_set_params() error: uninitialized symbol 'adc_sat'.
	drivers/media/tuners/tda8290.c:262 tda8290_set_params() error: uninitialized symbol 'adc_sat'.

That could cause an erratic behavior if PLL is not locked,
as the code will only work if
	!(pll_stat & 0x80) && (adc_sat < 20)

So, initialize it to zero, in order to let the code below
to be called, with should give more chances to adjust the
tuner gain, in order to get a PLL lock.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 79c5453d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment