]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: mdio: Clarify code flow Covarity 244085 & 244090
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 30 Jul 2019 21:51:41 +0000 (16:51 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 4 Sep 2019 16:37:18 +0000 (11:37 -0500)
Document that the lack of breaks is intentional.

Series-to: u-boot
Series-cc: ti

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
cmd/mdio.c

index add6440813f6f4f759c0d966eb0c8e78d7f818c7..22c8fbe856f37f482eb87f823f7baa03db22aaff 100644 (file)
@@ -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,