From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Fri, 16 Dec 2016 10:53:29 +0100 Subject: [U-Boot] [PATCH] common: Fix logic in fpga programming In-Reply-To: <01a805b5-9603-dc1c-bbc4-c08fae0106c4@topic.nl> References: <1e029d3a67722c20d8b6194d3388efe5ca92f5bf.1481881501.git.michal.simek@xilinx.com> <01a805b5-9603-dc1c-bbc4-c08fae0106c4@topic.nl> Message-ID: <34887b83-74fa-43be-d536-33169bcf8058@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 16.12.2016 10:50, Mike Looijmans wrote: > On 16-12-16 10:45, Michal Simek wrote: >> Stop boot process if fpga programming fails. >> >> Signed-off-by: Michal Simek >> --- >> >> 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"? Good idea. Will send v2 Thanks, Michal