Skip to content

Commit

Permalink
[PATCH] ppx32: Fix uninitialized variable in set_preferred_console
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras authored and Linus Torvalds committed May 20, 2005
1 parent 72480ef commit 45fed46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ppc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 45fed46

Please sign in to comment.