]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c
MdeModulePkg FaultTolerantWrite: Error handling for erase operation failure
[mirror_edk2.git] / MdeModulePkg / Universal / FaultTolerantWriteDxe / FaultTolerantWriteDxe.c
index 5f998c0c6656570ea38c451a833de4a14bcc7eb8..f5707292730d65187d2be8e7f2c53d7d51a27a88 100644 (file)
@@ -40,7 +40,7 @@
   If one of them is not satisfied, FtwWrite may fail.\r
   Usually, Spare area only takes one block. That's SpareAreaLength = BlockSize, NumberOfSpareBlock = 1.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -167,8 +167,8 @@ FvbNotificationEvent (
   EFI_FTW_DEVICE                          *FtwDevice;\r
 \r
   //\r
-  // Just return to avoid install SMM FaultTolerantWriteProtocol again\r
-  // if Fault Tolerant Write protocol had been installed.\r
+  // Just return to avoid installing FaultTolerantWriteProtocol again\r
+  // if Fault Tolerant Write protocol has been installed.\r
   //  \r
   Status = gBS->LocateProtocol (\r
                   &gEfiFaultTolerantWriteProtocolGuid, \r
@@ -227,6 +227,8 @@ FaultTolerantWriteInitialize (
   EFI_STATUS                              Status;\r
   EFI_FTW_DEVICE                          *FtwDevice;\r
 \r
+  FtwDevice = NULL;\r
+\r
   //\r
   // Allocate private data structure for FTW protocol and do some initialization\r
   //\r