[U-Boot] [PATCH] common: Fix logic in fpga programming
Mike Looijmans
mike.looijmans at topic.nl
Fri Dec 16 10:50:11 CET 2016
On 16-12-16 10:45, Michal Simek wrote:
> Stop boot process if fpga programming fails.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
> common/image.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/common/image.c b/common/image.c
> index bd07e86701a4..e3486e46a459 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 1;
Wouldn't "return err;" or "return -EIO;" make sense here instead of a magic "1"?
> +
> + printf(" Programming %s bitstream... OK", name);
> break;
> default:
> printf("The given image format is not supported (corrupt?)\n");
>
Kind regards,
Mike Looijmans
System Expert
TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans at topicproducts.com
Website: www.topicproducts.com
Please consider the environment before printing this e-mail
More information about the U-Boot
mailing list