MdeModulePkg: fix UninstallMultipleProtocolInterfaces() calls

Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
an (EFI_HANDLE*) as first parameter, the
UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
first parameter.

These are actual bugs. They must have remained hidden until now because
they are on error paths. Fix the UninstallMultipleProtocolInterfaces()
calls.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Laszlo Ersek
2019-09-07 00:50:42 +02:00
committed by Matt DeVillier
parent a03327088a
commit 42f99de779
7 changed files with 9 additions and 9 deletions

View File

@ -726,7 +726,7 @@ Error:
if (I2cBusContext != NULL) {
Status = gBS->UninstallMultipleProtocolInterfaces (
&Controller,
Controller,
gEfiCallerIdGuid,
I2cBusContext,
NULL

View File

@ -250,7 +250,7 @@ EnumerateNvmeDevNamespace (
);
if(EFI_ERROR(Status)) {
gBS->UninstallMultipleProtocolInterfaces (
&Device->DeviceHandle,
Device->DeviceHandle,
&gEfiDevicePathProtocolGuid,
Device->DevicePath,
&gEfiBlockIoProtocolGuid,

View File

@ -319,7 +319,7 @@ RegisterPciDevice (
);
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
&PciIoDevice->Handle,
PciIoDevice->Handle,
&gEfiDevicePathProtocolGuid,
PciIoDevice->DevicePath,
&gEfiPciIoProtocolGuid,
@ -357,7 +357,7 @@ RegisterPciDevice (
);
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
&PciIoDevice->Handle,
PciIoDevice->Handle,
&gEfiDevicePathProtocolGuid,
PciIoDevice->DevicePath,
&gEfiPciIoProtocolGuid,
@ -366,7 +366,7 @@ RegisterPciDevice (
);
if (HasEfiImage) {
gBS->UninstallMultipleProtocolInterfaces (
&PciIoDevice->Handle,
PciIoDevice->Handle,
&gEfiLoadFile2ProtocolGuid,
&PciIoDevice->LoadFile2,
NULL

View File

@ -671,7 +671,7 @@ CreateSerialDevice (
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
&SerialDevice->Handle,
SerialDevice->Handle,
&gEfiDevicePathProtocolGuid, SerialDevice->DevicePath,
&gEfiSerialIoProtocolGuid, &SerialDevice->SerialIo,
NULL

View File

@ -481,7 +481,7 @@ InstallProtocolOnPartition (
);
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
&Partition->Handle,
Partition->Handle,
&gEfiDevicePathProtocolGuid,
Partition->DevicePath,
&gEfiBlockIoProtocolGuid,

View File

@ -165,7 +165,7 @@ UsbCreateInterface (
if (EFI_ERROR (Status)) {
gBS->UninstallMultipleProtocolInterfaces (
&UsbIf->Handle,
UsbIf->Handle,
&gEfiDevicePathProtocolGuid,
UsbIf->DevicePath,
&gEfiUsbIoProtocolGuid,

View File

@ -581,7 +581,7 @@ UsbMassInitMultiLun (
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: OpenUsbIoProtocol By Child (%r)\n", Status));
gBS->UninstallMultipleProtocolInterfaces (
&UsbMass->Controller,
UsbMass->Controller,
&gEfiDevicePathProtocolGuid,
UsbMass->DevicePath,
&gEfiBlockIoProtocolGuid,