summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c
diff options
context:
space:
mode:
Diffstat (limited to 'EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c')
-rw-r--r--EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c
index b9ac6ce080..47b50a8e05 100644
--- a/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c
+++ b/EmulatorPkg/EmuBlockIoDxe/EmuBlockIo.c
@@ -1,6 +1,6 @@
/**@file
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, 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
which accompanies this distribution. The full text of the license may be found at
@@ -662,7 +662,6 @@ EmuBlockIoDriverBindingStop (
}
Private = EMU_BLOCK_IO_PRIVATE_DATA_FROM_THIS (BlockIo);
- Status = Private->IoThunk->Close (Private->IoThunk);
Status = gBS->UninstallMultipleProtocolInterfaces (
Private->EfiHandle,
@@ -677,14 +676,17 @@ EmuBlockIoDriverBindingStop (
This->DriverBindingHandle,
Handle
);
- }
-
- if (!EFI_ERROR (Status)) {
+ ASSERT_EFI_ERROR (Status);
+ //
+ // Destroy the IO interface.
+ //
+ Status = Private->IoThunk->Close (Private->IoThunk);
+ ASSERT_EFI_ERROR (Status);
//
// Free our instance data
//
FreeUnicodeStringTable (Private->ControllerNameTable);
- gBS->FreePool (Private);
+ FreePool (Private);
}
return Status;