]> git.sur5r.net Git - u-boot/commitdiff
env_nand: Use nand_read_skip_bad instead of nand_read
authorSteve Sakoman <steve@sakoman.com>
Fri, 3 Dec 2010 13:25:43 +0000 (13:25 +0000)
committerScott Wood <scottwood@freescale.com>
Tue, 7 Dec 2010 00:28:33 +0000 (18:28 -0600)
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 <steve.sakoman@linaro.org>
Acked-by: Scott Wood <scottwood@freescale.com>
common/env_nand.c

index 4e8307aa3332d67cc43dfd178ef5451e3d711377..7f6c91751891de647649460a55cb000a0d103420 100644 (file)
@@ -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;