mirror of https://github.com/acidanthera/audk.git
Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return
If the FLASH device cannot be erased or written, then the flag FlashError is set to TRUE. Add the missing logic to return an error if FlashError is TRUE. The missing logic was found from a GCC build that noticed a local variable was declared and assigned, but was not being used. Cc: Zailiang Sun <zailiang.sun@intel.com> Cc: Yi Qian <yi.qian@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Zailiang Sun <zailiang.sun@intel.com> Reviewed-by: Yi Qian <yi.qian@intel.com>
This commit is contained in:
parent
21d5bf86b2
commit
3eac7496be
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Platform Flash Access library.
|
||||
|
||||
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
@ -529,6 +529,10 @@ Done:
|
|||
Progress (EndPercentage);
|
||||
}
|
||||
|
||||
if (FlashError) {
|
||||
return EFI_WRITE_PROTECTED;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue