/* This service removes the handler associated with DispatchHandle so that it will no longer be called in response to a software SMI. */
EFI_STATUS EFIAPI SmmSwDispatch2UnRegister(IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, IN EFI_HANDLE DispatchHandle)
/* This service removes the handler associated with DispatchHandle so that it will no longer be called in response to a software SMI. */
EFI_STATUS EFIAPI SmmSwDispatch2UnRegister(IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, IN EFI_HANDLE DispatchHandle)
{
  EFI_SMM_SW_DISPATCH2_CONTEXT  *Context;
  Context = FindContextByDispatchHandle (DispatchHandle);
  ASSERT (Context != NULL);
  if (Context != NULL) {
    RemoveEntryList (&Context->Link);
    gSmst->SmmFreePool (Context);
  }
  return EFI_SUCCESS;
}