summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Core/Dxe/Hand/locate.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkModulePkg/Core/Dxe/Hand/locate.c')
-rw-r--r--EdkModulePkg/Core/Dxe/Hand/locate.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/EdkModulePkg/Core/Dxe/Hand/locate.c b/EdkModulePkg/Core/Dxe/Hand/locate.c
index faa4255c7e..54d72c30a2 100644
--- a/EdkModulePkg/Core/Dxe/Hand/locate.c
+++ b/EdkModulePkg/Core/Dxe/Hand/locate.c
@@ -702,15 +702,11 @@ Returns:
//
// Add code to correctly handle expected errors from CoreLocateHandle().
//
- if (EFI_ERROR(Status)) {
- switch (Status) {
- case EFI_BUFFER_TOO_SMALL:
- break;
- case EFI_INVALID_PARAMETER:
- return Status;
- default:
- return EFI_NOT_FOUND;
+ if (EFI_ERROR(Status) && Status != EFI_BUFFER_TOO_SMALL) {
+ if (Status != EFI_INVALID_PARAMETER) {
+ Status = EFI_NOT_FOUND;
}
+ return Status;
}
*Buffer = CoreAllocateBootServicesPool (BufferSize);