]> err.no Git - linux-2.6/commitdiff
[PATCH] ppx32: Fix uninitialized variable in set_preferred_console
authorPaul Mackerras <paulus@samba.org>
Fri, 20 May 2005 06:45:58 +0000 (16:45 +1000)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 20 May 2005 14:54:11 +0000 (07:54 -0700)
This fixes an uninitialized variable warning in arch/ppc/kernel/setup.c,
and this time gcc is actually right, there is a path that could result
in offset being uninitialized.  Zero is a sane default in this instance.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/kernel/setup.c

index 309797d7f96db35ab84484d17307d05766ec58b8..5c20266e3b1fd80c45f88af83d0a3b3b475d5bd4 100644 (file)
@@ -499,7 +499,7 @@ static int __init set_preferred_console(void)
 {
        struct device_node *prom_stdout;
        char *name;
-       int offset;
+       int offset = 0;
 
        if (of_stdout_device == NULL)
                return -ENODEV;