/* ReportStatusCode() messages will no longer be forwarded to the Callback function. */
EFI_STATUS EFIAPI Unregister(IN EFI_MM_RSC_HANDLER_CALLBACK Callback)
/* ReportStatusCode() messages will no longer be forwarded to the Callback function. */
EFI_STATUS EFIAPI Unregister(IN EFI_MM_RSC_HANDLER_CALLBACK Callback)
{
  LIST_ENTRY                     *Link;
  MM_RSC_HANDLER_CALLBACK_ENTRY  *CallbackEntry;
  if (Callback == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  for (Link = GetFirstNode (&mCallbackListHead); !IsNull (&mCallbackListHead, Link); Link = GetNextNode (&mCallbackListHead, Link)) {
    CallbackEntry = CR (Link, MM_RSC_HANDLER_CALLBACK_ENTRY, Node, MM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE);
    if (CallbackEntry->RscHandlerCallback == Callback) {
      RemoveEntryList (&CallbackEntry->Node);
      FreePool (CallbackEntry);
      return EFI_SUCCESS;
    }
  }
  return EFI_NOT_FOUND;
}