summaryrefslogtreecommitdiff
path: root/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c')
-rw-r--r--IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c
index 28037b6058..ce54c932f1 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c
@@ -13,7 +13,6 @@
**/
-
#include "UefiLibInternal.h"
/**
@@ -36,18 +35,17 @@
@retval EFI_SUCCESS The protocol installation is completed successfully.
@retval EFI_OUT_OF_RESOURCES There was not enough system resources to install the protocol.
@retval Others Status from gBS->InstallMultipleProtocolInterfaces().
-
**/
EFI_STATUS
EFIAPI
EfiLibInstallDriverBinding (
- IN CONST EFI_HANDLE ImageHandle,
- IN CONST EFI_SYSTEM_TABLE *SystemTable,
- IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
- IN EFI_HANDLE DriverBindingHandle
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
ASSERT (DriverBinding != NULL);
@@ -56,9 +54,6 @@ EfiLibInstallDriverBinding (
&gEfiDriverBindingProtocolGuid, DriverBinding,
NULL
);
- //
- // ASSERT if the call to InstallMultipleProtocolInterfaces() failed
- //
ASSERT_EFI_ERROR (Status);
//
@@ -70,7 +65,6 @@ EfiLibInstallDriverBinding (
return Status;
}
-
/**
Installs and completes the initialization of a Driver Binding Protocol instance and
optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols.
@@ -109,9 +103,11 @@ EfiLibInstallAllDriverProtocols (
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
- ASSERT (DriverBinding != NULL);
+ if (DriverBinding == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
if (DriverConfiguration == NULL) {
@@ -229,15 +225,15 @@ EfiLibInstallAllDriverProtocols (
EFI_STATUS
EFIAPI
EfiLibInstallDriverBindingComponentName2 (
- IN CONST EFI_HANDLE ImageHandle,
- IN CONST EFI_SYSTEM_TABLE *SystemTable,
- IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
- IN EFI_HANDLE DriverBindingHandle,
- IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
- IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL
+ IN CONST EFI_HANDLE ImageHandle,
+ IN CONST EFI_SYSTEM_TABLE *SystemTable,
+ IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
+ IN EFI_HANDLE DriverBindingHandle,
+ IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName, OPTIONAL
+ IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
ASSERT (DriverBinding != NULL);