summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-07-21 11:20:46 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-07-21 11:20:46 +0200
commit311d802790d987e7ce04f5b0dd0527cc8a6c09e6 (patch)
treedc3ab790717558a86f82d82053f8607778de2185 /common
parent5078cce81c77d52ff38921b43f5ea73eebf40251 (diff)
downloadu-boot-imx-311d802790d987e7ce04f5b0dd0527cc8a6c09e6.zip
u-boot-imx-311d802790d987e7ce04f5b0dd0527cc8a6c09e6.tar.gz
u-boot-imx-311d802790d987e7ce04f5b0dd0527cc8a6c09e6.tar.bz2
Check argument count in "mii" command.
Problem pointed out by Andrew Dyer, 13 Jun 2005
Diffstat (limited to 'common')
-rw-r--r--common/cmd_mii.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index 48a4e77..ee5e43e 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -57,6 +57,11 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
int rcode = 0;
char *devname;
+ if (argc < 2) {
+ printf ("Usage:\n%s\n", cmdtp->usage);
+ return 1;
+ }
+
#if defined(CONFIG_8xx) || defined(CONFIG_MCF52x2)
mii_init ();
#endif