summaryrefslogtreecommitdiffstats
path: root/StandaloneMmPkg/Core/Mmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'StandaloneMmPkg/Core/Mmi.c')
-rw-r--r--StandaloneMmPkg/Core/Mmi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/StandaloneMmPkg/Core/Mmi.c b/StandaloneMmPkg/Core/Mmi.c
index c1a1d76e85..0de6fd17fc 100644
--- a/StandaloneMmPkg/Core/Mmi.c
+++ b/StandaloneMmPkg/Core/Mmi.c
@@ -154,14 +154,9 @@ MmiManage (
Head = &MmiEntry->MmiHandlers;
}
- for (Link = Head->ForwardLink; Link != Head;) {
+ for (Link = Head->ForwardLink; Link != Head; Link = Link->ForwardLink) {
MmiHandler = CR (Link, MMI_HANDLER, Link, MMI_HANDLER_SIGNATURE);
- //
- // To support unregister MMI handler inside MMI handler itself,
- // get next node before handler is executed, since LIST_ENTRY that
- // Link points to may be freed if unregister MMI handler.
- //
- Link = Link->ForwardLink;
+
Status = MmiHandler->Handler (
(EFI_HANDLE)MmiHandler,
Context,