From: Heiko Schocher Date: Fri, 17 Sep 2010 11:10:35 +0000 (+0200) Subject: i2c: fix command usage help X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4444b221f2682a3377eecfecdef66ddfa9355cf3;p=u-boot.git i2c: fix command usage help Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher --- diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 1283c82afb..a7b65edd5f 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++;