[U-Boot] [PATCH v2] 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 michal.simek@xilinx.com ---
Changes in v2: - Return err instead of magic 1 - Reported-by: Mike - Extend commit message - Add \n to the printf message
common/image.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/common/image.c b/common/image.c index bd07e86701a4..909dbed1f20c 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");

On 16 December 2016 at 03:02, Michal Simek michal.simek@xilinx.com wrote:
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
Changes in v2:
- Return err instead of magic 1 - Reported-by: Mike
- Extend commit message
- Add \n to the printf message
common/image.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
participants (2)
-
Michal Simek
-
Simon Glass