summaryrefslogtreecommitdiffstats
path: root/FatPkg/EnhancedFatDxe
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2013-05-29 09:01:46 +0000
committerJordan Justen <jordan.l.justen@intel.com>2016-04-06 23:22:43 -0700
commit4a30cd67a507d0a57a724bbe4d783b58975d0d10 (patch)
treea6099cbcf3c233155b2e27df9d9f56c07671bf7c /FatPkg/EnhancedFatDxe
parent3ba5368df0a3d459606fe78bc73776359c8bc005 (diff)
downloadedk2-4a30cd67a507d0a57a724bbe4d783b58975d0d10.tar.gz
edk2-4a30cd67a507d0a57a724bbe4d783b58975d0d10.tar.bz2
edk2-4a30cd67a507d0a57a724bbe4d783b58975d0d10.zip
InitializeUnicodeCollationSupportWorker mixed the use of Status variable for OpenProtocol and return, it will cause the function to return EFI_SUCCESS even the proper UnicodeCollation is absent. Add ReturnStatus to hold the return status.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> (based on FatPkg commit c7046d14e7ebbb03282a5225ed43feee7889a9e9) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg/EnhancedFatDxe')
-rw-r--r--FatPkg/EnhancedFatDxe/UnicodeCollation.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/FatPkg/EnhancedFatDxe/UnicodeCollation.c b/FatPkg/EnhancedFatDxe/UnicodeCollation.c
index 50720f3df9..61b9aab4d9 100644
--- a/FatPkg/EnhancedFatDxe/UnicodeCollation.c
+++ b/FatPkg/EnhancedFatDxe/UnicodeCollation.c
@@ -2,7 +2,7 @@
Unicode Collation Support component that hides the trivial difference of Unicode Collation
and Unicode collation 2 Protocol.
- Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -40,6 +40,7 @@ InitializeUnicodeCollationSupportWorker (
IN CONST CHAR8 *DefaultLanguage
)
{
+ EFI_STATUS ReturnStatus;
EFI_STATUS Status;
UINTN NumHandles;
UINTN Index;
@@ -63,7 +64,7 @@ InitializeUnicodeCollationSupportWorker (
Iso639Language = (BOOLEAN) (ProtocolGuid == &gEfiUnicodeCollationProtocolGuid);
GetEfiGlobalVariable2 (VariableName, (VOID**) &Language, NULL);
- Status = EFI_UNSUPPORTED;
+ ReturnStatus = EFI_UNSUPPORTED;
for (Index = 0; Index < NumHandles; Index++) {
//
// Open Unicode Collation Protocol
@@ -94,7 +95,7 @@ InitializeUnicodeCollationSupportWorker (
if (BestLanguage != NULL) {
FreePool (BestLanguage);
mUnicodeCollationInterface = Uci;
- Status = EFI_SUCCESS;
+ ReturnStatus = EFI_SUCCESS;
break;
}
}
@@ -105,7 +106,7 @@ InitializeUnicodeCollationSupportWorker (
FreePool (Handles);
- return Status;
+ return ReturnStatus;
}
/**