]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
[mirror_edk2.git] / Vlv2TbltDevicePkg / Feature / Capsule / Library / PlatformFlashAccessLib / PlatformFlashAccessLib.c
index 052ccb891c0d7e3abd41f0fb86165f8cb44fc174..079c3ef2d68e975227bc472c03acc7c8b77cce2d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Platform Flash Access library.\r
 \r
-  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -529,6 +529,10 @@ Done:
     Progress (EndPercentage);\r
   }\r
 \r
+  if (FlashError) {\r
+    return EFI_WRITE_PROTECTED;\r
+  }\r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r