From e4a3922f03ce0948b7b95d86eea50876a7a239ee Mon Sep 17 00:00:00 2001 From: qwang12 Date: Sun, 1 Feb 2009 10:04:40 +0000 Subject: 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 --- MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg/Universal/PCD/Dxe/Pcd.c') 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 -- cgit v1.1