diff --git a/MdeModulePkg/Library/GraphicsLib/Graphics.c b/MdeModulePkg/Library/GraphicsLib/Graphics.c index 56204aaeca..851f40e75e 100644 --- a/MdeModulePkg/Library/GraphicsLib/Graphics.c +++ b/MdeModulePkg/Library/GraphicsLib/Graphics.c @@ -687,6 +687,7 @@ Print ( VerticalResolution = 0; Blt = NULL; FontInfo = NULL; + PrintNum = 0; if (GraphicsOutput != NULL) { HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution; @@ -834,7 +835,7 @@ Error: SafeFreePool (FontInfo); FreePool (Buffer); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { return PrintNum; } else { return 0;