Omap35xxPkg/Flash: Fixed 'NandStatus may be used before being set'
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13753 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/Omap35xxPkg/Flash/Flash.c b/Omap35xxPkg/Flash/Flash.c
index dfe99b0..0056acd 100644
--- a/Omap35xxPkg/Flash/Flash.c
+++ b/Omap35xxPkg/Flash/Flash.c
@@ -411,6 +411,7 @@
NandSendCommand(PROGRAM_PAGE_CONFIRM_CMD);
//Poll till device is busy.
+ NandStatus = 0;
while (Timeout) {
NandStatus = NandReadStatus();
if ((NandStatus & NAND_READY) == NAND_READY) {
@@ -462,6 +463,7 @@
NandSendCommand(BLOCK_ERASE_CONFIRM_CMD);
//Poll till device is busy.
+ NandStatus = 0;
while (Timeout) {
NandStatus = NandReadStatus();
if ((NandStatus & NAND_READY) == NAND_READY) {