From: Steve Sakoman Date: Fri, 3 Dec 2010 13:25:43 +0000 (+0000) Subject: env_nand: Use nand_read_skip_bad instead of nand_read X-Git-Tag: v2010.12-rc3~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=068a208b4a3e1e0dfc8dea6ebbd80b62ae280732;p=u-boot env_nand: Use nand_read_skip_bad instead of nand_read The nand-read function returns an error code if correctable errors have occurred. This is not desirable, since the errors have been corrected! This patch switches to the nand_read_skip_bad function which does not return an error code if the errors are correctable. Signed-off-by: Steve Sakoman Acked-by: Scott Wood --- diff --git a/common/env_nand.c b/common/env_nand.c index 4e8307aa33..7f6c917518 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf) offset += blocksize; } else { char_ptr = &buf[amount_loaded]; - if (nand_read(&nand_info[0], offset, &len, char_ptr)) + if (nand_read_skip_bad(&nand_info[0], offset, &len, char_ptr)) return 1; offset += blocksize; amount_loaded += len;