This patch updates the constructor of DpcLib to return error if failed to
locate DPC protocol.

Cc: Ye Ting <ting...@intel.com>
Cc: Wu Jiaxin <jiaxin...@intel.com>
Cc: Wang Fan <fan.w...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan...@intel.com>
---
 MdeModulePkg/Library/DxeDpcLib/DpcLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/DxeDpcLib/DpcLib.c 
b/MdeModulePkg/Library/DxeDpcLib/DpcLib.c
index 6eda8ca0fb..ddc3e0adda 100644
--- a/MdeModulePkg/Library/DxeDpcLib/DpcLib.c
+++ b/MdeModulePkg/Library/DxeDpcLib/DpcLib.c
@@ -45,7 +45,7 @@ DpcLibConstructor (
   Status = gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID **)&mDpc);
   ASSERT_EFI_ERROR (Status);
 
-  return EFI_SUCCESS;
+  return Status;
 }
 
 /**
-- 
2.13.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to