mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Return invalid param in LocateProtocol for Protocol==NULL
Return EFI_INVALID_PARAMETER in LocateProtocol for Protocol==NULL to follow UEFI 2.7 spec PiSmmCore is also updated as the EFI_SMM_SYSTEM_TABLE2.SmmLocateProtocol is reusing the definition of EFI_LOCATE_PROTOCOL. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
d65f7eeb4c
commit
415fc5e5a4
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Locate handle functions
|
Locate handle functions
|
||||||
|
|
||||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -560,14 +560,10 @@ CoreLocateProtocol (
|
||||||
PROTOCOL_NOTIFY *ProtNotify;
|
PROTOCOL_NOTIFY *ProtNotify;
|
||||||
IHANDLE *Handle;
|
IHANDLE *Handle;
|
||||||
|
|
||||||
if (Interface == NULL) {
|
if ((Interface == NULL) || (Protocol == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Protocol == NULL) {
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
*Interface = NULL;
|
*Interface = NULL;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Locate handle functions
|
Locate handle functions
|
||||||
|
|
||||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
|
@ -205,14 +205,10 @@ SmmLocateProtocol (
|
||||||
PROTOCOL_NOTIFY *ProtNotify;
|
PROTOCOL_NOTIFY *ProtNotify;
|
||||||
IHANDLE *Handle;
|
IHANDLE *Handle;
|
||||||
|
|
||||||
if (Interface == NULL) {
|
if ((Interface == NULL) || (Protocol == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Protocol == NULL) {
|
|
||||||
return EFI_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
*Interface = NULL;
|
*Interface = NULL;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue