diff options
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Dxe/Pcd.c')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c index 0495dcfd06..e403f3d4ad 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
|