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
parent 9ee135501b
commit 9388c6b1c1
7 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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