diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/fpga/socfpga_arria10.c | 6 | ||||
-rw-r--r-- | drivers/net/fsl-mc/mc.c | 2 | ||||
-rw-r--r-- | drivers/net/pfe_eth/pfe_firmware.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c index 4bea7fd900d..b992e6f0805 100644 --- a/drivers/fpga/socfpga_arria10.c +++ b/drivers/fpga/socfpga_arria10.c @@ -566,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); diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index c9cf6a987e1..972db4cf3a0 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -142,7 +142,7 @@ int parse_mc_firmware_fit_image(u64 mc_fw_addr, return -EINVAL; } - if (!fit_check_format(fit_hdr)) { + if (fit_check_format(fit_hdr, IMAGE_SIZE_INVAL)) { printf("fsl-mc: ERR: Bad firmware image (bad FIT header)\n"); return -EINVAL; } diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c index 41999e176d4..eee70a2e73a 100644 --- a/drivers/net/pfe_eth/pfe_firmware.c +++ b/drivers/net/pfe_eth/pfe_firmware.c @@ -160,7 +160,7 @@ static int pfe_fit_check(void) return ret; } - if (!fit_check_format(pfe_fit_addr)) { + if (fit_check_format(pfe_fit_addr, IMAGE_SIZE_INVAL)) { printf("PFE Firmware: Bad firmware image (bad FIT header)\n"); ret = -1; return ret; |