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:
@@ -244,7 +244,7 @@ EnumerateNvmeDevNamespace (
|
||||
);
|
||||
if(EFI_ERROR(Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
&Device->DeviceHandle,
|
||||
Device->DeviceHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
Device->DevicePath,
|
||||
&gEfiBlockIoProtocolGuid,
|
||||
|
@@ -313,7 +313,7 @@ RegisterPciDevice (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
&PciIoDevice->Handle,
|
||||
PciIoDevice->Handle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
PciIoDevice->DevicePath,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
@@ -351,7 +351,7 @@ RegisterPciDevice (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
&PciIoDevice->Handle,
|
||||
PciIoDevice->Handle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
PciIoDevice->DevicePath,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
@@ -360,7 +360,7 @@ RegisterPciDevice (
|
||||
);
|
||||
if (HasEfiImage) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
&PciIoDevice->Handle,
|
||||
PciIoDevice->Handle,
|
||||
&gEfiLoadFile2ProtocolGuid,
|
||||
&PciIoDevice->LoadFile2,
|
||||
NULL
|
||||
|
@@ -665,7 +665,7 @@ CreateSerialDevice (
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
&SerialDevice->Handle,
|
||||
SerialDevice->Handle,
|
||||
&gEfiDevicePathProtocolGuid, SerialDevice->DevicePath,
|
||||
&gEfiSerialIoProtocolGuid, &SerialDevice->SerialIo,
|
||||
NULL
|
||||
|
Reference in New Issue
Block a user