]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7156): em28xx/em28xx-core.c: fix use of potentially uninitialized variable
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 5 Feb 2008 10:37:21 +0000 (07:37 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 18 Feb 2008 14:15:13 +0000 (11:15 -0300)
drivers/media/video/em28xx/em28xx-core.c: In function 'em28xx_set_audio_source':
drivers/media/video/em28xx/em28xx-core.c:276: warning: 'no_ac97' may be used uninitialized in this function

This looks like a genuine bug to me.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/em28xx/em28xx-core.c

index 41ed4be4ae01e25abe7e41186f0da38240fdb381..33d323cbce7a08570f4f05e21026f97f75103ee8 100644 (file)
@@ -273,7 +273,8 @@ int em28xx_set_audio_source(struct em28xx *dev)
        static char *enable  = "\x08\x08";
        static char *disable = "\x08\x88";
        char *video = enable, *line = disable;
-       int ret, no_ac97;
+       int ret;
+       int no_ac97 = 0;
        u8 input;
 
        if (dev->is_em2800) {