diff options
author | Benjamin Larsson <benjamin@southpole.se> | 2014-03-16 22:41:13 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-07 09:39:13 -0300 |
commit | 534c92143222ed4150d3d5e241388541baeb080b (patch) | |
tree | 0d23e95082c80bb97119535a36f5431ec40d53aa /drivers/media | |
parent | 99b0f3c96cebf3af9a645d9b00db14cb04fcdfa2 (diff) |
[media] r820t: fix size and init values
Correct the initialization values at the start of the function
and use proper variable sizes to prevent overflow.
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/tuners/r820t.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index 319adc4f056..96ccfebce7c 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c @@ -1468,7 +1468,8 @@ static int r820t_imr_prepare(struct r820t_priv *priv) static int r820t_multi_read(struct r820t_priv *priv) { int rc, i; - u8 data[2], min = 0, max = 255, sum = 0; + u16 sum = 0; + u8 data[2], min = 255, max = 0; usleep_range(5000, 6000); |