diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-01 10:04:40 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-01 10:04:40 +0000 |
commit | e4a3922f03ce0948b7b95d86eea50876a7a239ee (patch) | |
tree | 9f848c5b33e24cc5808ac3dc7e8ce343b686eae6 /MdeModulePkg/Universal | |
parent | 092d6a181f02e09e4d6a3d4df2b0ab1c22bca3d6 (diff) | |
download | edk2-platforms-e4a3922f03ce0948b7b95d86eea50876a7a239ee.tar.xz |
Update the protocol function to return EFI_INVALID_PARAMETER if CallBackFunction == NULL. The PCD library function will do ASSERT if CallBackFunction is NULL.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7385 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 9 | ||||
-rw-r--r-- | MdeModulePkg/Universal/PCD/Pei/Pcd.c | 12 |
2 files changed, 14 insertions, 7 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
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);
}
|