IB/mlx5: remove redundant assignment of mdev
authorColin Ian King <colin.king@canonical.com>
Tue, 9 Jan 2018 15:55:43 +0000 (15:55 +0000)
committerDoug Ledford <dledford@redhat.com>
Wed, 10 Jan 2018 21:52:52 +0000 (16:52 -0500)
The initial assignment to mdev is redundant as mdev is re-assigned
later and the first assigned value is never read. Remove this
redundant assignment.

Cleans up clang warning:
drivers/infiniband/hw/mlx5/main.c:359:24: warning: Value stored
to 'mdev' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c

index 5d6fba9..91e6b42 100644 (file)
@@ -356,7 +356,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
                                struct ib_port_attr *props)
 {
        struct mlx5_ib_dev *dev = to_mdev(device);
-       struct mlx5_core_dev *mdev = dev->mdev;
+       struct mlx5_core_dev *mdev;
        struct net_device *ndev, *upper;
        enum ib_mtu ndev_ib_mtu;
        bool put_mdev = true;