Small code refinement in MdeModulePkg.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10492 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3
2010-05-17 08:32:05 +00:00
parent 0e4483bc69
commit f0c855b263
4 changed files with 70 additions and 89 deletions

View File

@@ -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;
}