Omap35xxPkg/Flash: Fixed 'NandStatus may be used before being set'
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 27 Sep 2012 13:41:04 +0000 (13:41 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 27 Sep 2012 13:41:04 +0000 (13:41 +0000)
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

Omap35xxPkg/Flash/Flash.c

index dfe99b0..0056acd 100644 (file)
@@ -411,6 +411,7 @@ NandWritePage (
   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 @@ NandEraseBlock (
   NandSendCommand(BLOCK_ERASE_CONFIRM_CMD);
 
   //Poll till device is busy.
+  NandStatus = 0;
   while (Timeout) {
     NandStatus = NandReadStatus();
     if ((NandStatus & NAND_READY) == NAND_READY) {