summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Dxe/Pcd.c')
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Pcd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
index 0495dcf..e403f3d 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
@@ -869,8 +869,9 @@ DxeRegisterCallBackOnSet (
{
EFI_STATUS Status;
- ASSERT (CallBackFunction != NULL);
-
+ if (CallBackFunction == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Aquire lock to prevent reentrance from TPL_CALLBACK level
//
@@ -905,7 +906,9 @@ DxeUnRegisterCallBackOnSet (
{
EFI_STATUS Status;
- ASSERT (CallBackFunction != NULL);
+ if (CallBackFunction == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Aquire lock to prevent reentrance from TPL_CALLBACK level