net/mlx5: remove self-assignment on esw->dev
authorColin Ian King <colin.king@canonical.com>
Fri, 2 Aug 2019 15:13:16 +0000 (16:13 +0100)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 6 Aug 2019 21:00:04 +0000 (14:00 -0700)
There is a self assignment of esw->dev to itself, clean this up by
removing it. Also make dev a const pointer.

Addresses-Coverity: ("Self assignment")
Fixes: 6cedde451399 ("net/mlx5: E-Switch, Verify support QoS element type")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index d4465dd18c119203982251f7f0d4d78caa4b7bc3..81e03e493a0124d28c105067fa3f40a33fb22d15 100644 (file)
@@ -1413,7 +1413,7 @@ out:
 
 static bool element_type_supported(struct mlx5_eswitch *esw, int type)
 {
-       struct mlx5_core_dev *dev = esw->dev = esw->dev;
+       const struct mlx5_core_dev *dev = esw->dev;
 
        switch (type) {
        case SCHEDULING_CONTEXT_ELEMENT_TYPE_TSAR: