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

Alban Bedel alban.bedel at avionic-design.de
Thu Mar 31 08:30:59 PDT 2016


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 78518fd..c436b83 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -530,7 +530,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.8.0




More information about the kexec mailing list