summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-01 10:04:40 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-01 10:04:40 +0000
commite4a3922f03ce0948b7b95d86eea50876a7a239ee (patch)
tree9f848c5b33e24cc5808ac3dc7e8ce343b686eae6 /MdeModulePkg/Universal/PCD/Dxe/Pcd.c
parent092d6a181f02e09e4d6a3d4df2b0ab1c22bca3d6 (diff)
downloadedk2-e4a3922f03ce0948b7b95d86eea50876a7a239ee.zip
edk2-e4a3922f03ce0948b7b95d86eea50876a7a239ee.tar.gz
edk2-e4a3922f03ce0948b7b95d86eea50876a7a239ee.tar.bz2
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/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