add some error check and return.
authorvanjeff <vanjeff@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 19 Mar 2008 05:49:56 +0000 (05:49 +0000)
committervanjeff <vanjeff@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 19 Mar 2008 05:49:56 +0000 (05:49 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4912 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/IntelFrameworkModulePkg/Library/GraphicsLib/Graphics.c
edk2/MdeModulePkg/Library/GraphicsLib/Graphics.c
edk2/MdeModulePkg/Universal/BdsDxe/MemoryTest.c
edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c

index 283d9be..ea8c7d5 100644 (file)
@@ -415,6 +415,8 @@ Returns:
     if (EFI_ERROR (Status)) {\r
       return EFI_UNSUPPORTED;\r
     }\r
+  } else {\r
+    return EFI_UNSUPPORTED;\r
   }\r
 \r
   Instance = 0;\r
index e944217..cccbc6b 100644 (file)
@@ -470,6 +470,8 @@ Returns:
     if (EFI_ERROR (Status)) {\r
       return EFI_UNSUPPORTED;\r
     }\r
+  } else {\r
+    return EFI_UNSUPPORTED;\r
   }\r
 \r
   Instance = 0;\r
@@ -607,6 +609,8 @@ Returns:
                             Height,\r
                             Width * sizeof (EFI_UGA_PIXEL)\r
                             );\r
+      } else {\r
+      Status = EFI_UNSUPPORTED;\r
       }\r
     }\r
 \r
index 002b830..fe167e0 100644 (file)
@@ -152,6 +152,8 @@ Returns:
                           SizeOfY - (PosY - GLYPH_HEIGHT - 1),\r
                           SizeOfX * sizeof (EFI_UGA_PIXEL)\r
                           );\r
+    } else {\r
+      return EFI_UNSUPPORTED;\r
     }\r
   }\r
   //\r
@@ -185,6 +187,8 @@ Returns:
                           BlockHeight,\r
                           (BlockWidth) * sizeof (EFI_UGA_PIXEL)\r
                           );\r
+    } else {\r
+      return EFI_UNSUPPORTED;\r
     }\r
   }\r
 \r
index 48c5c1b..2cf2f3e 100644 (file)
@@ -424,6 +424,9 @@ GraphicsConsoleControllerDriverStart (
           goto Error;\r
         }\r
       }\r
+    } else {\r
+      Status = EFI_UNSUPPORTED;\r
+      goto Error;\r
     }\r
   }\r
 \r