Revert "RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed later"

This reverts commit 06b27ccb90.

Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Liming Gao 2023-11-17 18:00:12 +08:00 committed by mergify[bot]
parent 15538bc62e
commit 8dd52c949e
1 changed files with 15 additions and 16 deletions

View File

@ -1547,26 +1547,25 @@ TestForRequiredProtocols (
ControllerHandle,
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
);
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}
Status = gBS->OpenProtocol (
ControllerHandle,
gRequiredProtocol[Index].DiscoveredProtocolGuid,
(VOID **)&Id,
This->DriverBindingHandle,
ControllerHandle,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (!EFI_ERROR (Status)) {
// Already installed
return EFI_UNSUPPORTED;
Status = gBS->OpenProtocol (
ControllerHandle,
gRequiredProtocol[Index].DiscoveredProtocolGuid,
(VOID **)&Id,
This->DriverBindingHandle,
ControllerHandle,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (EFI_ERROR (Status)) {
if (Index == ListCount - 1) {
DEBUG ((DEBUG_INFO, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));
return EFI_SUCCESS;
}
}
}
}
DEBUG ((DEBUG_MANAGEABILITY, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));
return EFI_SUCCESS;
return EFI_UNSUPPORTED;
}
/**