diff options
-rw-r--r-- | common/spl/spl_nand.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 1e6f2dce569..d13a5245974 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -43,15 +43,15 @@ static ulong spl_nand_fit_read(struct spl_load_info *load, ulong offs, ulong size, void *dst) { ulong sector; - int ret; + int err; sector = *(int *)load->priv; offs = sector + nand_spl_adjust_offset(sector, offs - sector); - ret = nand_spl_load_image(offs, size, dst); - if (!ret) - return size; - else + err = nand_spl_load_image(offs, size, dst); + if (err) return 0; + + return size; } static int spl_nand_load_element(struct spl_image_info *spl_image, |