diff options
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Pei/Pcd.c')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Pei/Pcd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c index f98b26ff45..41b34269a0 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c @@ -835,8 +835,10 @@ PeiRegisterCallBackOnSet ( return EFI_UNSUPPORTED;
}
- ASSERT (CallBackFunction != NULL);
-
+ if (CallBackFunction == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, TRUE);
}
@@ -864,8 +866,10 @@ PcdUnRegisterCallBackOnSet ( return EFI_UNSUPPORTED;
}
- ASSERT (CallBackFunction != NULL);
-
+ if (CallBackFunction == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, FALSE);
}
|