[U-Boot] [PATCH 6/7] usb: hub: Don't continue on get_port_status failure

Marek Vasut marex at denx.de
Tue May 3 22:51:19 CEST 2016


The code shouldn't continue probing the port if get_port_status() failed.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Chin Liang See <clsee at altera.com>
Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
Cc: Hans de Goede <hdegoede at redhat.com>
Cc: Stefan Roese <sr at denx.de>
Cc: Stephen Warren <swarren at nvidia.com>
---
 common/usb_hub.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index 4f59802..0f39c9f 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -402,6 +402,7 @@ static int usb_scan_port(struct usb_device_scan *usb_scan)
 			free(usb_scan);
 			return 0;
 		}
+		return 0;
 	}
 
 	portstatus = le16_to_cpu(portsts->wPortStatus);
-- 
2.7.0



More information about the U-Boot mailing list