]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c
MdeModulePkg/FvSimpleFs: don't open DevicePath with BY_DRIVER mode
[mirror_edk2.git] / MdeModulePkg / Universal / FvSimpleFileSystemDxe / FvSimpleFileSystemEntryPoint.c
index 975ab88ca1cf47df7d86212785530d3a19e1e92a..7167fb950b1ea36d849e1fb7754b1471993a0c31 100644 (file)
@@ -12,7 +12,7 @@
   from the UEFI shell. It is entirely read-only.\r
 \r
 Copyright (c) 2014, ARM Limited. All rights reserved.\r
-Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -452,9 +452,7 @@ FvSimpleFileSystemDriverStart (
   // Create an instance\r
   //\r
   Instance = AllocateZeroPool (sizeof (FV_FILESYSTEM_INSTANCE));\r
-  if (Instance == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
+  ASSERT (Instance != NULL);\r
 \r
   Instance->Root = NULL;\r
   Instance->FvProtocol = FvProtocol;\r
@@ -469,6 +467,7 @@ FvSimpleFileSystemDriverStart (
                   EFI_NATIVE_INTERFACE,\r
                   &Instance->SimpleFs\r
                   );\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
   // Decide on a filesystem volume label, which will include the FV's guid.\r
@@ -481,7 +480,7 @@ FvSimpleFileSystemDriverStart (
                    (VOID **) &FvDevicePath,\r
                    gImageHandle,\r
                    ControllerHandle,\r
-                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
                    );\r
   if (!EFI_ERROR (Status)) {\r
     //\r
@@ -528,7 +527,7 @@ FvSimpleFileSystemDriverStart (
                               );\r
   }\r
 \r
-  return Status;\r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r