summaryrefslogtreecommitdiff
path: root/common/cmd_usb.c
diff options
context:
space:
mode:
authorSerge Ziryukin <ftrvxmtrx@gmail.com>2010-04-25 21:32:36 +0300
committerWolfgang Denk <wd@denx.de>2010-05-06 23:35:34 +0200
commit65d342541e78ab9a22bf480cc4fe2f659f94bad4 (patch)
tree2e8d8673981e6ca7fe0463e96c6074db215bc04a /common/cmd_usb.c
parente4a95d112e5ea8368bfbdac6ff963d1b8dc63cf0 (diff)
cmd_usb.c: show cmd usage if no args given
Signed-off-by: Serge Ziryukin <ftrvxmtrx@gmail.com>
Diffstat (limited to 'common/cmd_usb.c')
-rw-r--r--common/cmd_usb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index ee3755c121c..fcb5f763c02 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -516,6 +516,11 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
block_dev_desc_t *stor_dev;
#endif
+ if (argc < 2) {
+ cmd_usage(cmdtp);
+ return 1;
+ }
+
if ((strncmp(argv[1], "reset", 5) == 0) ||
(strncmp(argv[1], "start", 5) == 0)) {
usb_stop();