All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][PATCH 08/19] i2c: fix command usage help
Date: Thu, 29 Jul 2010 12:44:45 +0200	[thread overview]
Message-ID: <4C515B9D.2090805@denx.de> (raw)

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 common/cmd_i2c.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index a1a84a1..91e60ae 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1297,6 +1297,11 @@ static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
 	cmd_tbl_t *c;

+	if (argc < 2) {
+		cmd_usage(cmdtp);
+		return 1;
+	}
+
 	/* Strip off leading 'i2c' command argument */
 	argc--;
 	argv++;
-- 
1.6.2.5

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

             reply	other threads:[~2010-07-29 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 10:44 Heiko Schocher [this message]
2010-07-29 15:40 ` [U-Boot] [RFC][PATCH 08/19] i2c: fix command usage help Peter Tyser
2010-07-30  6:04   ` Heiko Schocher
2010-08-03 10:15     ` [U-Boot] [RFC][PATCH v2 " Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C515B9D.2090805@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.