[PATCH v2 1/3] zImage-arm: Fix a return value check that use the wrong variable

Nikolaus Schulz nikolaus.schulz at avionic-design.de
Fri Apr 29 07:22:21 PDT 2016


From: Alban Bedel <alban.bedel at avionic-design.de>

When looking for a hole to put the initrd in the error check used the
wrong variable.

Signed-off-by: Alban Bedel <alban.bedel at avionic-design.de>
---
 kexec/arch/arm/kexec-zImage-arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
index d85ab9b..0ac194d 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -529,7 +529,7 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
 			unsigned long initrd_base_new = locate_hole(info,
 					hole_size, page_size,
 					initrd_base, ULONG_MAX, INT_MAX);
-			if (base == ULONG_MAX)
+			if (initrd_base_new == ULONG_MAX)
 				return -1;
 			initrd_base = initrd_base_new;
 		}
-- 
2.1.4




More information about the kexec mailing list