summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorFeng Tian <feng.tian@intel.com>2016-03-02 09:45:06 +0800
committerFeng Tian <feng.tian@intel.com>2016-03-03 15:50:19 +0800
commitb07c966581329965fbf6b4619d0d1b822db3b6fa (patch)
tree2644b24597d083ffa1bac43adeedbebd1a57c590 /MdeModulePkg/Universal
parent913ba15120b4dfa58fb90e859161ccf976015321 (diff)
downloadedk2-b07c966581329965fbf6b4619d0d1b822db3b6fa.tar.gz
edk2-b07c966581329965fbf6b4619d0d1b822db3b6fa.tar.bz2
edk2-b07c966581329965fbf6b4619d0d1b822db3b6fa.zip
MdeModulePkg/FvSimpleFs: don't open DevicePath with BY_DRIVER mode
The device path protocol doesn't get closed at FvSimpleFilesystem driver stop() when it's opened at start() with BY_DRIVER mode. We change it to open DevicePath with GET_PROTOCOL mode as FV2 protocol with BY_DRIVER is enough. Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c
index 975ab88ca1..7167fb950b 100644
--- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c
+++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemEntryPoint.c
@@ -12,7 +12,7 @@
from the UEFI shell. It is entirely read-only.
Copyright (c) 2014, ARM Limited. All rights reserved.
-Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -452,9 +452,7 @@ FvSimpleFileSystemDriverStart (
// Create an instance
//
Instance = AllocateZeroPool (sizeof (FV_FILESYSTEM_INSTANCE));
- if (Instance == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
+ ASSERT (Instance != NULL);
Instance->Root = NULL;
Instance->FvProtocol = FvProtocol;
@@ -469,6 +467,7 @@ FvSimpleFileSystemDriverStart (
EFI_NATIVE_INTERFACE,
&Instance->SimpleFs
);
+ ASSERT_EFI_ERROR (Status);
//
// Decide on a filesystem volume label, which will include the FV's guid.
@@ -481,7 +480,7 @@ FvSimpleFileSystemDriverStart (
(VOID **) &FvDevicePath,
gImageHandle,
ControllerHandle,
- EFI_OPEN_PROTOCOL_BY_DRIVER
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (!EFI_ERROR (Status)) {
//
@@ -528,7 +527,7 @@ FvSimpleFileSystemDriverStart (
);
}
- return Status;
+ return EFI_SUCCESS;
}
/**