]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/PCD/Dxe/Pcd.c
Update the protocol function to return EFI_INVALID_PARAMETER if CallBackFunction...
[mirror_edk2.git] / MdeModulePkg / Universal / PCD / Dxe / Pcd.c
index 0495dcfd06e38bd6ff9daba46cd2676c25a3a3b5..e403f3d4adff93a1723624f41171ed3d25bedb50 100644 (file)
@@ -869,8 +869,9 @@ DxeRegisterCallBackOnSet (
 {\r
   EFI_STATUS Status;\r
   \r
-  ASSERT (CallBackFunction != NULL);\r
-  \r
+  if (CallBackFunction == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
   //\r
   // Aquire lock to prevent reentrance from TPL_CALLBACK level\r
   //\r
@@ -905,7 +906,9 @@ DxeUnRegisterCallBackOnSet (
 {\r
   EFI_STATUS Status;\r
   \r
-  ASSERT (CallBackFunction != NULL);\r
+  if (CallBackFunction == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
 \r
   //\r
   // Aquire lock to prevent reentrance from TPL_CALLBACK level\r