]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c
Fixed bug in partition driver:
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbBus / Dxe / usbbus.c
index 837a6001dd44262c670e95f0720374a0a4835412..029d9cb4255bf06bb44b1210d1f27929e333d1e4 100644 (file)
@@ -1276,6 +1276,7 @@ UsbDeviceDeConfiguration (
   USB_IO_DEVICE             *ChildDevice;\r
   UINT8                     Index;\r
   EFI_USB_IO_PROTOCOL       *UsbIo;\r
+  EFI_STATUS                Status;\r
 \r
   //\r
   // Double check UsbIoDevice exists\r
@@ -1365,14 +1366,17 @@ UsbDeviceDeConfiguration (
     // Uninstall EFI_USB_IO_PROTOCOL & DEVICE_PATH_PROTOCOL\r
     // installed on this handle\r
     //\r
-    gBS->UninstallMultipleProtocolInterfaces (\r
-          UsbController->Handle,\r
-          &gEfiDevicePathProtocolGuid,\r
-          UsbController->DevicePath,\r
-          &gEfiUsbIoProtocolGuid,\r
-          &UsbController->UsbIo,\r
-          NULL\r
-          );\r
+    Status = gBS->UninstallMultipleProtocolInterfaces (\r
+                    UsbController->Handle,\r
+                    &gEfiDevicePathProtocolGuid,\r
+                    UsbController->DevicePath,\r
+                    &gEfiUsbIoProtocolGuid,\r
+                    &UsbController->UsbIo,\r
+                    NULL\r
+                    );\r
+    if (EFI_ERROR (Status)) {\r
+      return Status;\r
+    }\r
 \r
     if (UsbController->DevicePath != NULL) {\r
       gBS->FreePool (UsbController->DevicePath);\r