usb: hub: Don't continue on get_port_status failure
authorMarek Vasut <marex@denx.de>
Tue, 3 May 2016 20:22:59 +0000 (22:22 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 6 May 2016 18:06:56 +0000 (20:06 +0200)
The code shouldn't continue probing the port if get_port_status() failed.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Stephen Warren <swarren@nvidia.com>
common/usb_hub.c

index 4f59802d591da96c9e566740ff78e07e65a5bb47..0f39c9faf7ea4248cd8e60da5fc1b6446208ebf7 100644 (file)
@@ -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);