summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-06-18 23:46:21 -0400
committerTom Rini <trini@konsulko.com>2016-06-18 23:46:21 -0400
commita10a31ec91ad2ee514a42baea9314553aa972676 (patch)
tree4fa6eff1efde896343c455854b5c78b2b91bd9e9 /cmd
parent2372b0012925f9100980151f4a28347c82feaba8 (diff)
parent1e6fb0e367564d427d7c57fa7b3b972ecb7147a3 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-usb
Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
Diffstat (limited to 'cmd')
-rw-r--r--cmd/usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/usb.c b/cmd/usb.c
index b83d3233b7..58d9db29d7 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -800,7 +800,8 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int dev = (int)simple_strtoul(argv[2], NULL, 10);
printf("\nUSB device %d: ", dev);
stor_dev = blk_get_devnum_by_type(IF_TYPE_USB, dev);
- if (stor_dev == NULL) {
+ if ((stor_dev == NULL) ||
+ (stor_dev->if_type == IF_TYPE_UNKNOWN)) {
printf("unknown device\n");
return 1;
}