mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
092d6a181f
commit
e4a3922f03
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue