diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 84ffb35957..f1a95b7b8f 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -424,6 +424,10 @@ AcpiView ( EfiConfigurationTable = NULL; OriginalAttribute = 0; + // Reset The error/warning counters + ResetErrorCount (); + ResetWarningCount (); + // Search the table for an entry that matches the ACPI Table Guid FoundAcpiTable = FALSE; for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) { @@ -566,10 +570,6 @@ ShellCommandRunAcpiView ( Package = NULL; TmpDumpFileHandle = NULL; - // Reset The error/warning counters - ResetErrorCount (); - ResetWarningCount (); - Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE); if (EFI_ERROR (Status)) { if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {