summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-06-05 16:43:38 +0200
committerMichal Simek <michal.simek@xilinx.com>2018-09-11 11:00:54 +0200
commita2d1033b2078e5c16b86b31c7ba41c92111cb45a (patch)
treee792e32d0b70e0b657d1ec9117cfafa3bb52d957
parent8c75f7943df0e849cf1431cd1b3d3e67180a158c (diff)
cmd: fpga: Use CMD_RET_FAILURE instead of simple 1
Use standard return command failure macro. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--cmd/fpga.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd/fpga.c b/cmd/fpga.c
index de9d19dd8e..89fae86b82 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -371,7 +371,7 @@ static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int argc,
if (gunzip((void *)data, ~0UL, (void *)image_buf,
&image_size) != 0) {
puts("GUNZIP: error\n");
- return 1;
+ return CMD_RET_FAILURE;
}
data_size = image_size;
#else
@@ -395,32 +395,32 @@ static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int argc,
if (!fit_uname) {
puts("No FIT subimage unit name\n");
- return 1;
+ return CMD_RET_FAILURE;
}
if (!fit_check_format(fit_hdr)) {
puts("Bad FIT image format\n");
- return 1;
+ return CMD_RET_FAILURE;
}
/* get fpga component image node offset */
noffset = fit_image_get_node(fit_hdr, fit_uname);
if (noffset < 0) {
printf("Can't find '%s' FIT subimage\n", fit_uname);
- return 1;
+ return CMD_RET_FAILURE;
}
/* verify integrity */
if (!fit_image_verify(fit_hdr, noffset)) {
puts("Bad Data Hash\n");
- return 1;
+ return CMD_RET_FAILURE;
}
/* get fpga subimage data address and length */
if (fit_image_get_data(fit_hdr, noffset, &fit_data,
&data_size)) {
puts("Fpga subimage data not found\n");
- return 1;
+ return CMD_RET_FAILURE;
}
return fpga_load(dev, fit_data, data_size, BIT_FULL);
@@ -428,7 +428,7 @@ static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int argc,
#endif
default:
puts("** Unknown image type\n");
- return FPGA_FAIL;
+ return CMD_RET_FAILURE;
}
}
#endif