]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
MdeMdeModulePkg/UsbBusDxe: If DisconnectController() returns an error the USB Bus...
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbHub.c
index 9e5299c0ef81ec6003bec64db0bae0f0a8dfdae3..2fcacad46e468d2f0fc5f90bf3d06d696ac33509 100644 (file)
@@ -988,6 +988,10 @@ UsbHubResetPort (
   for (Index = 0; Index < USB_WAIT_PORT_STS_CHANGE_LOOP; Index++) {\r
     Status = UsbHubGetPortStatus (HubIf, Port, &PortState);\r
 \r
+    if (EFI_ERROR (Status)) {\r
+      return Status;\r
+    }\r
+\r
     if (!EFI_ERROR (Status) &&\r
         USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_RESET)) {\r
       gBS->Stall (USB_SET_PORT_RECOVERY_STALL);\r