setup_memory_ranges() can fail, so we must check its return value.
Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
---
kexec/arch/ppc64/kexec-ppc64.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: kexec-tools/kexec/arch/ppc64/kexec-ppc64.c
===================================================================
--- kexec-tools.orig/kexec/arch/ppc64/kexec-ppc64.c
+++ kexec-tools/kexec/arch/ppc64/kexec-ppc64.c
@@ -613,8 +613,9 @@ int get_memory_ranges(struct memory_rang
return -1;
if (alloc_memory_ranges())
return -1;
+ if (setup_memory_ranges(kexec_flags))
+ return -1;
- setup_memory_ranges(kexec_flags);
*range = memory_range;
*ranges = nr_memory_ranges;
fprintf(stderr, "get memory ranges:%d\n", nr_memory_ranges);
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot