diff options
-rw-r--r-- | cmd/mdio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/mdio.c b/cmd/mdio.c index a6fa9266d0..add6440813 100644 --- a/cmd/mdio.c +++ b/cmd/mdio.c @@ -268,6 +268,11 @@ static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) break; } + if (!bus) { + puts("No MDIO bus found\n"); + return CMD_RET_FAILURE; + } + if (op[0] == 'l') { mdio_list_devices(); |