ArmPkg/MmCommunicationDxe: fix logic bug in DXE driver entrypoint
Commit2fe25a74d6
("ArmPkg/MmCommunicationDxe: relay architected PI events to MM context") update the ARM specific standalone MM client driver to register for certain events in the entrypoint code, but did so in a way that makes the entrypoint always return with an error. Instead, return EFI_SUCCESS if registering for those events succeeds, and back out the registrations that did succeed if one fails, and return an error. Fixes:2fe25a74d6
("ArmPkg/MmCommunicationDxe: relay architected PI events to MM context") Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
This commit is contained in:
committed by
mergify[bot]
parent
e63d54db95
commit
3be909099c
@ -390,8 +390,16 @@ MmCommunicationInitialize (
|
|||||||
MmGuidedEventNotify, mGuidedEventGuid[Index],
|
MmGuidedEventNotify, mGuidedEventGuid[Index],
|
||||||
mGuidedEventGuid[Index], &mGuidedEvent[Index]);
|
mGuidedEventGuid[Index], &mGuidedEvent[Index]);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
while (Index-- > 0) {
|
||||||
|
gBS->CloseEvent (mGuidedEvent[Index]);
|
||||||
|
}
|
||||||
|
goto UninstallProtocol;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
|
UninstallProtocol:
|
||||||
gBS->UninstallProtocolInterface (
|
gBS->UninstallProtocolInterface (
|
||||||
mMmCommunicateHandle,
|
mMmCommunicateHandle,
|
||||||
&gEfiMmCommunicationProtocolGuid,
|
&gEfiMmCommunicationProtocolGuid,
|
||||||
|
Reference in New Issue
Block a user