Use standard return command failure macro.

Signed-off-by: Michal Simek <michal.si...@xilinx.com>
---

 cmd/fpga.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/cmd/fpga.c b/cmd/fpga.c
index 8237bbc219b4..5fabfca39a2b 100644
--- a/cmd/fpga.c
+++ b/cmd/fpga.c
@@ -357,12 +357,12 @@ static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int 
argc,
                                           (void *)image_buf,
                                           &image_size) != 0) {
                                        puts("GUNZIP: error\n");
-                                       return 1;
+                                       return CMD_RET_FAILURE;
                                }
                                data_size = image_size;
 #else
                                puts("Gunzip image is not supported\n");
-                               return 1;
+                               return CMD_RET_FAILURE;
 #endif
                        } else {
                                data = (ulong)image_get_data(hdr);
@@ -381,12 +381,12 @@ 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 */
@@ -394,20 +394,20 @@ static int do_fpga_loadmk(cmd_tbl_t *cmdtp, int flag, int 
argc,
                        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);
@@ -415,7 +415,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
-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to