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>
/** @file\r
Locate handle functions\r
\r
/** @file\r
Locate handle functions\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
PROTOCOL_NOTIFY *ProtNotify;\r
IHANDLE *Handle;\r
\r
PROTOCOL_NOTIFY *ProtNotify;\r
IHANDLE *Handle;\r
\r
- if (Interface == NULL) {\r
+ if ((Interface == NULL) || (Protocol == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Protocol == NULL) {\r
- return EFI_NOT_FOUND;\r
- }\r
-\r
*Interface = NULL;\r
Status = EFI_SUCCESS;\r
\r
*Interface = NULL;\r
Status = EFI_SUCCESS;\r
\r
/** @file\r
Locate handle functions\r
\r
/** @file\r
Locate handle functions\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at \r
This program and the accompanying materials are licensed and made available \r
under the terms and conditions of the BSD License which accompanies this \r
distribution. The full text of the license may be found at \r
PROTOCOL_NOTIFY *ProtNotify;\r
IHANDLE *Handle;\r
\r
PROTOCOL_NOTIFY *ProtNotify;\r
IHANDLE *Handle;\r
\r
- if (Interface == NULL) {\r
+ if ((Interface == NULL) || (Protocol == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (Protocol == NULL) {\r
- return EFI_NOT_FOUND;\r
- }\r
-\r
*Interface = NULL;\r
Status = EFI_SUCCESS;\r
\r
*Interface = NULL;\r
Status = EFI_SUCCESS;\r
\r