[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 <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index eac9b28..6d4e67f 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -854,7 +854,8 @@
int n = ed - st;
memcpy(buf, oob_buf + st, n);
buf += n;
- }
+ } else
+ break;
}
return 0;
}
@@ -1295,7 +1296,8 @@
int n = ed - st;
memcpy(oob_buf + st, buf, n);
buf += n;
- }
+ } else
+ break;
}
return 0;
}