diff options
Diffstat (limited to 'drivers/fpga/socfpga_arria10.c')
-rw-r--r-- | drivers/fpga/socfpga_arria10.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c index 44e1ac54c3f..b992e6f0805 100644 --- a/drivers/fpga/socfpga_arria10.c +++ b/drivers/fpga/socfpga_arria10.c @@ -4,6 +4,7 @@ */ #include <image.h> #include <log.h> +#include <asm/global_data.h> #include <asm/io.h> #include <asm/arch/fpga_manager.h> #include <asm/arch/reset_manager.h> @@ -565,10 +566,10 @@ static int first_loading_rbf_to_buffer(struct udevice *dev, if (ret < 0) return ret; - ret = fit_check_format(buffer_p); - if (!ret) { + ret = fit_check_format(buffer_p, IMAGE_SIZE_INVAL); + if (ret) { debug("FPGA: No valid FIT image was found.\n"); - return -EBADF; + return ret; } confs_noffset = fdt_path_offset(buffer_p, FIT_CONFS_PATH); |