From: Heiko Schocher Date: Fri, 17 Sep 2010 13:10:35 +0200 Subject: [U-Boot] [PATCH 08/26 v2][NEXT] i2c: fix command usage help In-Reply-To: <1284721853-8298-8-git-send-email-hs@denx.de> References: <4C62E8C3.8050006@denx.de> <1284721853-8298-1-git-send-email-hs@denx.de> <1284721853-8298-2-git-send-email-hs@denx.de> <1284721853-8298-3-git-send-email-hs@denx.de> <1284721853-8298-4-git-send-email-hs@denx.de> <1284721853-8298-5-git-send-email-hs@denx.de> <1284721853-8298-6-git-send-email-hs@denx.de> <1284721853-8298-7-git-send-email-hs@denx.de> <1284721853-8298-8-git-send-email-hs@denx.de> Message-ID: <1284721853-8298-9-git-send-email-hs@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher --- common/cmd_i2c.c | 3 +++ 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++; -- 1.6.2.5