add return error check.
authorvanjeff <vanjeff@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 17 Mar 2008 08:14:53 +0000 (08:14 +0000)
committervanjeff <vanjeff@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 17 Mar 2008 08:14:53 +0000 (08:14 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4860 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdeModulePkg/Library/GraphicsLib/Graphics.c

index f2509c1..e86b493 100644 (file)
@@ -456,7 +456,10 @@ Returns:
   Badging = NULL;\r
   Status  = gBS->LocateProtocol (&gEfiOEMBadgingProtocolGuid, NULL, (VOID**)&Badging);\r
 \r
-  ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenGraphics);\r
+  Status = ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenGraphics);\r
+  if (EFI_ERROR (Status)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
 \r
   if (GraphicsOutput != NULL) {\r
     SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;\r