diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-17 08:32:05 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-17 08:32:05 +0000 |
commit | f0c855b26386c16ba0a70600d72cd09c090db0e0 (patch) | |
tree | 14527b04cad3e48d713e7577f02a595eb7b1b1b2 /MdeModulePkg/Universal/PlatformDriOverrideDxe | |
parent | 0e4483bc69aa31f1facbe62af438fa4feaf4503a (diff) | |
download | edk2-f0c855b26386c16ba0a70600d72cd09c090db0e0.zip edk2-f0c855b26386c16ba0a70600d72cd09c090db0e0.tar.gz edk2-f0c855b26386c16ba0a70600d72cd09c090db0e0.tar.bz2 |
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.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c index 38812f9..1e5481e 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;
}
|