From: Michal Simek Date: Fri, 16 Dec 2016 09:35:40 +0000 (+0100) Subject: common: Fix logic in fpga programming X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=611a9428c7183f91ae676a4b2c239e23ea68e0d7;p=u-boot.git common: Fix logic in fpga programming Stop boot process if fpga programming fails. Without this patch boot process continues even if fpga programming failed. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- diff --git a/common/image.c b/common/image.c index bd07e86701..909dbed1f2 100644 --- a/common/image.c +++ b/common/image.c @@ -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");