diff options
Diffstat (limited to 'common/cmd_i2c.c')
-rw-r--r-- | 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++; |