summaryrefslogtreecommitdiff
path: root/common/cmd_i2c.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2010-09-17 13:10:35 +0200
committerWolfgang Denk <wd@denx.de>2010-09-19 19:29:52 +0200
commit4444b221f2682a3377eecfecdef66ddfa9355cf3 (patch)
treeab93d959b3b633947ef81db9098a1c7a29733a01 /common/cmd_i2c.c
parent3fbeeea63334f7a69406be7c05185f4bf45da8d8 (diff)
downloadu-boot-imx-4444b221f2682a3377eecfecdef66ddfa9355cf3.zip
u-boot-imx-4444b221f2682a3377eecfecdef66ddfa9355cf3.tar.gz
u-boot-imx-4444b221f2682a3377eecfecdef66ddfa9355cf3.tar.bz2
i2c: fix command usage help
Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'common/cmd_i2c.c')
-rw-r--r--common/cmd_i2c.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 1283c82..a7b65ed 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1288,6 +1288,9 @@ static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *c;
+ if (argc < 2)
+ return cmd_usage(cmdtp);
+
/* Strip off leading 'i2c' command argument */
argc--;
argv++;