X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=nand_spl%2Fnand_boot_fsl_elbc.c;h=ff47d55311e21cc57b42d8808c972a11f3668a97;hb=e0f2318f85780c9f4fd5ea0bb5da475b33ebdf78;hp=0d0c44e1e366d3343b8b5e14bfbe6fbe122f8d20;hpb=c70564e6b1bd08f3230182392238907f3531a87e;p=u-boot diff --git a/nand_spl/nand_boot_fsl_elbc.c b/nand_spl/nand_boot_fsl_elbc.c index 0d0c44e1e3..ff47d55311 100644 --- a/nand_spl/nand_boot_fsl_elbc.c +++ b/nand_spl/nand_boot_fsl_elbc.c @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -120,7 +119,7 @@ static void nand_load(unsigned int offs, int uboot_size, uchar *dst) pos += page_size; offs += page_size; - } while (offs & (block_size - 1)); + } while ((offs & (block_size - 1)) && (pos < uboot_size)); } }