OSDN Git Service

net/mlx5: remove erroneous fallthrough
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 3 Aug 2020 14:34:48 +0000 (17:34 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 15 Sep 2020 18:59:49 +0000 (11:59 -0700)
This isn't a fall through because it was after a return statement.  The
fall through annotation leads to a Smatch warning:

    drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:246
    mlx5e_ethtool_get_sset_count() warn: ignoring unreachable code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 5cb1e48..e2f092e 100644 (file)
@@ -243,7 +243,6 @@ int mlx5e_ethtool_get_sset_count(struct mlx5e_priv *priv, int sset)
                return MLX5E_NUM_PFLAGS;
        case ETH_SS_TEST:
                return mlx5e_self_test_num(priv);
-               fallthrough;
        default:
                return -EOPNOTSUPP;
        }