From: Kyungmin Park Date: Fri, 9 Mar 2007 00:41:07 +0000 (+0900) Subject: [MTD] [OneNAND] Exit the loop when transferring/filling of the oob is finished X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5bc399e9ef430efd5725b66aa2ad7ad2d81e372b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [MTD] [OneNAND] Exit the loop when transferring/filling of the oob is finished When transferring/filling of the oob is finished in OOB_AUTO, we exit the loop Signed-off-by: Kyungmin Park Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index eac9b2878596..6d4e67f6c295 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -854,7 +854,8 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col int n = ed - st; memcpy(buf, oob_buf + st, n); buf += n; - } + } else + break; } return 0; } @@ -1295,7 +1296,8 @@ static int onenand_fill_auto_oob(struct mtd_info *mtd, u_char *oob_buf, int n = ed - st; memcpy(oob_buf + st, buf, n); buf += n; - } + } else + break; } return 0; }