aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2019-07-30 16:51:41 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2019-09-04 11:37:18 -0500
commit14a8adebb559ca6dbf563a0246ad8d2241606879 (patch)
tree81d0489f80d4fbcdaea666eac71b5ae16c6dfbe3
parent398e7512d8d7ea5aac8ba0a72c07a3810ce39f42 (diff)
downloadu-boot-14a8adebb559ca6dbf563a0246ad8d2241606879.zip
u-boot-14a8adebb559ca6dbf563a0246ad8d2241606879.tar.gz
u-boot-14a8adebb559ca6dbf563a0246ad8d2241606879.tar.bz2
net: mdio: Clarify code flow Covarity 244085 & 244090
Document that the lack of breaks is intentional. Series-to: u-boot Series-cc: ti Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--cmd/mdio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/mdio.c b/cmd/mdio.c
index add6440..22c8fbe 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -253,12 +253,13 @@ static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 'w':
if (pos > 1)
data = simple_strtoul(argv[pos--], NULL, 16);
+ /* Intentional fall-through - Get reg for read and write */
case 'r':
if (pos > 1)
if (extract_reg_range(argv[pos--], &devadlo, &devadhi,
&reglo, &reghi))
return CMD_RET_FAILURE;
-
+ /* Intentional fall-through - Get phy for all commands */
default:
if (pos > 1)
if (extract_phy_range(&argv[2], pos - 1, &bus,