Skip to content

Commit

Permalink
net/mlx5: Remove unneeded variable in mlx5_unload_one
Browse files Browse the repository at this point in the history
mlx5_unload_one do not need local variable to store different value,
Hence just remove it.

Signed-off-by: zhong jiang <[email protected]>
Acked-by: Saeed Mahameed <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
  • Loading branch information
xiongzhongjiang authored and Saeed Mahameed committed Nov 1, 2019
1 parent cc4db57 commit 32680da
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/mellanox/mlx5/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,8 +1228,6 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, bool boot)

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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 32680da

Please sign in to comment.