diff options
author | Paul Mackerras <paulus@samba.org> | 2005-05-05 23:29:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-06 01:00:52 -0400 |
commit | 3892c5fa9455670466f9f5518b3b7ef12ef3ccd6 (patch) | |
tree | 4f2e43fd2efd413a9b45a90129e62516c0d16808 | |
parent | 6741f3a7f9922391cd02b3ca1329e669497dc22f (diff) |
[PATCH] ppc64: fix prom.c compile warning
The code in unflatten_device_tree knows that get_property is written to
only return with lenp equal to 1 when also returning a valid pointer.
The gcc 3.3.3 compiler is not able to prove this to itself, so it warns
about a possible uninitialized pointer dereference:
.../arch/ppc64/kernel/prom.c: In function `unflatten_device_tree':
.../arch/ppc64/kernel/prom.c:828:
warning: `p' might be used uninitialized in this function
Unless it is desired to rework the interaction between the two
functions, this will keep the existing behavior but quiet the compiler.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/ppc64/kernel/prom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index fe2946c58314..eb6538b58008 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c | |||
@@ -834,7 +834,7 @@ void __init unflatten_device_tree(void) | |||
834 | { | 834 | { |
835 | unsigned long start, mem, size; | 835 | unsigned long start, mem, size; |
836 | struct device_node **allnextp = &allnodes; | 836 | struct device_node **allnextp = &allnodes; |
837 | char *p; | 837 | char *p = NULL; |
838 | int l = 0; | 838 | int l = 0; |
839 | 839 | ||
840 | DBG(" -> unflatten_device_tree()\n"); | 840 | DBG(" -> unflatten_device_tree()\n"); |