summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/PlatformDriOverrideDxe
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-17 08:32:05 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-17 08:32:05 +0000
commitf0c855b26386c16ba0a70600d72cd09c090db0e0 (patch)
tree14527b04cad3e48d713e7577f02a595eb7b1b1b2 /MdeModulePkg/Universal/PlatformDriOverrideDxe
parent0e4483bc69aa31f1facbe62af438fa4feaf4503a (diff)
downloadedk2-platforms-f0c855b26386c16ba0a70600d72cd09c090db0e0.tar.xz
Small code refinement in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10492 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PlatformDriOverrideDxe')
-rw-r--r--MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
index 38812f92f2..1e5481ef72 100644
--- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
+++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
@@ -1654,26 +1654,7 @@ PlatDriOverrideDxeInit (
return EFI_SUCCESS;
Finish:
- if (mCallbackInfo->DriverHandle != NULL) {
- gBS->UninstallMultipleProtocolInterfaces (
- mCallbackInfo->DriverHandle,
- &gEfiDevicePathProtocolGuid,
- &mHiiVendorDevicePath,
- &gEfiHiiConfigAccessProtocolGuid,
- &mCallbackInfo->ConfigAccess,
- &gEfiPlatformDriverOverrideProtocolGuid,
- &mCallbackInfo->PlatformDriverOverride,
- NULL
- );
- }
-
- if (mCallbackInfo->RegisteredHandle != NULL) {
- HiiRemovePackages (mCallbackInfo->RegisteredHandle);
- }
-
- if (mCallbackInfo != NULL) {
- FreePool (mCallbackInfo);
- }
+ PlatDriOverrideDxeUnload (ImageHandle);
return Status;
}
@@ -1691,6 +1672,8 @@ PlatDriOverrideDxeUnload (
IN EFI_HANDLE ImageHandle
)
{
+ ASSERT (mCallbackInfo != NULL);
+
if (mCallbackInfo->DriverHandle != NULL) {
gBS->UninstallMultipleProtocolInterfaces (
mCallbackInfo->DriverHandle,
@@ -1708,9 +1691,7 @@ PlatDriOverrideDxeUnload (
HiiRemovePackages (mCallbackInfo->RegisteredHandle);
}
- if (mCallbackInfo != NULL) {
- FreePool (mCallbackInfo);
- }
+ FreePool (mCallbackInfo);
return EFI_SUCCESS;
}