]> git.sur5r.net Git - u-boot/commitdiff
common: Fix logic in fpga programming
authorMichal Simek <michal.simek@xilinx.com>
Fri, 16 Dec 2016 09:35:40 +0000 (10:35 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 20 Dec 2016 08:15:27 +0000 (09:15 +0100)
Stop boot process if fpga programming fails.
Without this patch boot process continues even if fpga programming
failed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/image.c

index bd07e86701a4171c2a2c7a428d3a5dbe632782d5..909dbed1f20c9bc4c1c71884e933d6982f076bd3 100644 (file)
@@ -1375,11 +1375,10 @@ int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
                                                img_len, BIT_PARTIAL);
                }
 
-               printf("   Programming %s bitstream... ", name);
                if (err)
-                       printf("failed\n");
-               else
-                       printf("OK\n");
+                       return err;
+
+               printf("   Programming %s bitstream... OK\n", name);
                break;
        default:
                printf("The given image format is not supported (corrupt?)\n");