diff options
author | Olof Johansson <olof@lixom.net> | 2006-02-15 21:40:44 -0600 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-20 10:44:34 +1100 |
commit | 2b9a32edba3af9ad4ccb23574bea0cc34455dc43 (patch) | |
tree | dafc13a20cd4f4c280a3e66411189b0b37f9996c /arch/powerpc/kernel | |
parent | 0728a2f99ef6efd1984f9e0ed59834c1cc602e6f (diff) | |
download | lwn-2b9a32edba3af9ad4ccb23574bea0cc34455dc43.tar.gz lwn-2b9a32edba3af9ad4ccb23574bea0cc34455dc43.zip |
[PATCH] powerpc: Fix OOPS in lparcfg on G5
Fallback gracefully when reading /proc/ppc64/lparcfg when the /rtas
device node can't be found.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 1ae96a8ed7e2..e789fef4eb8a 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c @@ -341,7 +341,7 @@ static int lparcfg_data(struct seq_file *m, void *v) const char *system_id = ""; unsigned int *lp_index_ptr, lp_index = 0; struct device_node *rtas_node; - int *lrdrp; + int *lrdrp = NULL; rootdn = find_path_device("/"); if (rootdn) { @@ -362,7 +362,9 @@ static int lparcfg_data(struct seq_file *m, void *v) seq_printf(m, "partition_id=%d\n", (int)lp_index); rtas_node = find_path_device("/rtas"); - lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL); + if (rtas_node) + lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", + NULL); if (lrdrp == NULL) { partition_potential_processors = vdso_data->processorCount; |