summaryrefslogtreecommitdiff
path: root/api/api_net.c
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2016-06-17 14:18:11 +0800
committerMarek Vasut <marex@denx.de>2016-06-18 00:48:31 +0200
commit7839f5f8092762f048076c6c7b010c10f2ee8a0b (patch)
tree6bce194048f0a09be82743d43769f7528aa938ec /api/api_net.c
parentef53b8c4ce2919d6685d2dc0c51a91a180433ff0 (diff)
downloadu-boot-imx-7839f5f8092762f048076c6c7b010c10f2ee8a0b.zip
u-boot-imx-7839f5f8092762f048076c6c7b010c10f2ee8a0b.tar.gz
u-boot-imx-7839f5f8092762f048076c6c7b010c10f2ee8a0b.tar.bz2
cmd: usb: check if_type before using this device
For legacy usb storage driver, USB_MAX_STOR_DEV is defined as 7. If we only have one usb disk on board, `usb dev 0` is ok. But if `usb dev 1`, still ok, then `usb read xxx` will trigger system fault and reboot. So check if_type before using this device. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'api/api_net.c')
0 files changed, 0 insertions, 0 deletions