summaryrefslogtreecommitdiff
path: root/common/cmd_mii.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_mii.c')
-rw-r--r--common/cmd_mii.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index 48a4e77..e659536 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
@@ -112,8 +117,6 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
miiphy_speed (devname, j),
(miiphy_duplex (devname, j) == FULL)
? "FDX" : "HDX");
- } else {
- puts ("Error reading info from the PHY\n");
}
}
} else if (op == 'r') {
@@ -498,8 +501,6 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
miiphy_speed (devname, j),
(miiphy_duplex (devname, j) == FULL)
? "FDX" : "HDX");
- } else {
- puts ("Error reading info from the PHY\n");
}
}
} else if (op[0] == 'r') {