From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Mack Date: Fri, 28 Nov 2008 20:36:30 +0100 Subject: [U-Boot] [PATCH] fix lib_arm/bootm.c Message-ID: <20081128193630.GC14044@buzzloop.caiaq.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, while digging thru the sources to find out why U-Boot won't start my Linux kernel, I stumbled over lib_arm/bootm.c and its check for the falg variable. I wonder how this ever worked as the condition is really heavy to match unless BOOTM_STATE_OS_GO is 0 which it isn't. So I guess the patch below is mandatory or you could write an unlikely() around that check ;) Best regards, Daniel diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c index 8e264ce..58a101f 100644 --- a/lib_arm/bootm.c +++ b/lib_arm/bootm.c @@ -67,7 +67,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) char *commandline = getenv ("bootargs"); #endif - if ((flag != 0) || (flag != BOOTM_STATE_OS_GO)) + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; theKernel = (void (*)(int, int, uint))images->ep;