]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_bootm.c
mac: Fix the condition check for setting the MAC from the EEPROM
[u-boot] / common / cmd_bootm.c
index 1b8a8c15610f68954643f967081d61ca8eee0e74..f0338babeba8f580a1f0fff7c77d3e590f137a6a 100644 (file)
@@ -47,7 +47,6 @@
 #endif
 
 #if defined(CONFIG_OF_LIBFDT)
-#include <fdt.h>
 #include <libfdt.h>
 #include <fdt_support.h>
 #endif
@@ -498,7 +497,8 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
                return CMD_RET_USAGE;
        }
 
-       if (images.state >= state) {
+       if (images.state < BOOTM_STATE_START ||
+           images.state >= state) {
                printf("Trying to execute a command out of order\n");
                return CMD_RET_USAGE;
        }