diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_usb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c index ca06826901..2ed4cb474f 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -630,12 +630,11 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) bus; uclass_next_device(&bus)) { struct usb_device *udev; - struct udevice *hub; + struct udevice *dev; - device_find_first_child(bus, &hub); - if (device_get_uclass_id(hub) == UCLASS_USB_HUB && - device_active(hub)) { - udev = dev_get_parentdata(hub); + device_find_first_child(bus, &dev); + if (dev && device_active(dev)) { + udev = dev_get_parentdata(dev); usb_show_tree(udev); } } |