]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Omap35xxPkg/Flash/Flash.c
Omap35xxPkg/Flash: Fixed 'NandStatus may be used before being set'
[mirror_edk2.git] / Omap35xxPkg / Flash / Flash.c
index 1bd781ded0c71c9469ea285251e5d4847f025df6..0056acd6b94683e71f25e59c9aa2f00bc4f4efcf 100644 (file)
@@ -1,8 +1,8 @@
 /** @file
 
-  Copyright (c) 2008-2009, Apple Inc. All rights reserved.
+  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
   
-  All rights reserved. This program and the accompanying materials
+  This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
   http://opensource.org/licenses/bsd-license.php
@@ -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) {