Hi,

On Thu, 10 Aug 2017 22:53:31 -0700 Suneel Garapati wrote:
> usb tree and info commands may cause crash otherwise
> 
> Signed-off-by: Suneel Garapati <suneelgli...@gmail.com>
> ---
>  cmd/usb.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/cmd/usb.c b/cmd/usb.c
> index 992d414..81e1a7b 100644
> --- a/cmd/usb.c
> +++ b/cmd/usb.c
> @@ -415,7 +415,8 @@ static void usb_show_tree_graph(struct usb_device *dev, 
> char *pre)
>               udev = dev_get_parent_priv(child);
>  
>               /* Ignore emulators, we only want real devices */
> -             if (device_get_uclass_id(child) != UCLASS_USB_EMUL) {
> +             if (device_get_uclass_id(child) !=
> +                 (UCLASS_USB_EMUL | UCLASS_BLK)) {
>
This should most probably be:
> +             if ((device_get_uclass_id(child) != UCLASS_USB_EMUL) &&
                        (device_get_uclass_id(child) != UCLASS_BLK)) {


Lothar Waßmann
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to