[media] r820t: fix size and init values
authorBenjamin Larsson <benjamin@southpole.se>
Mon, 17 Mar 2014 01:41:13 +0000 (22:41 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 7 Apr 2014 12:39:13 +0000 (09:39 -0300)
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>
drivers/media/tuners/r820t.c

index 319adc4f0561a0fff3f671dc38dcc20bf65ca8c2..96ccfebce7cad32f8891c04be9bdddc71b6e152d 100644 (file)
@@ -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);
 
This page took 0.024872 seconds and 5 git commands to generate.