net/bootp.c: fix compile warning
[platform/kernel/u-boot.git] / lib_arm / bootm.c
index 6c2f37e..128b7e3 100644 (file)
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -62,12 +62,14 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
        char    *s;
        int     machid = bd->bi_arch_number;
        void    (*theKernel)(int zero, int arch, uint params);
-       int     ret;
 
 #ifdef CONFIG_CMDLINE_TAG
        char *commandline = getenv ("bootargs");
 #endif
 
+       if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
+               return 1;
+
        theKernel = (void (*)(int, int, uint))images->ep;
 
        s = getenv ("machid");
@@ -125,7 +127,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
 
        theKernel (0, machid, bd->bi_boot_params);
        /* does not return */
-error:
+
        return 1;
 }