net/mlx5: Remove unneeded variable in mlx5_unload_one
authorzhong jiang <zhongjiang@huawei.com>
Thu, 12 Sep 2019 16:59:02 +0000 (00:59 +0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 1 Nov 2019 21:55:14 +0000 (14:55 -0700)
mlx5_unload_one do not need local variable to store different value,
Hence just remove it.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index e47dd7c..c9a091d 100644 (file)
@@ -1228,8 +1228,6 @@ function_teardown:
 
 static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup)
 {
-       int err = 0;
-
        if (cleanup) {
                mlx5_unregister_device(dev);
                mlx5_drain_health_wq(dev);
@@ -1257,7 +1255,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup)
        mlx5_function_teardown(dev, cleanup);
 out:
        mutex_unlock(&dev->intf_state_mutex);
-       return err;
+       return 0;
 }
 
 static int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)