pxe: try bootz if bootm fails to find a valid image

Standard pxelinux servers will typically use a zImage rather than u-boot
image format, so fallback to bootz if bootm fails.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
[tushar.behera@linaro.org: Cherry-picked to current tracking branch]
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 9f1c14d..346eb61 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -711,10 +711,11 @@
 	if (bootm_argv[3])
 		bootm_argc = 4;
 
-#ifdef CONFIG_CMD_BOOTZ
-	do_bootz(NULL, 0, bootm_argc, bootm_argv);
-#else
 	do_bootm(NULL, 0, bootm_argc, bootm_argv);
+
+#ifdef CONFIG_CMD_BOOTZ
+	/* Try booting a zImage if do_bootm returns */
+	do_bootz(NULL, 0, bootm_argc, bootm_argv);
 #endif
 	return 1;
 }