Skip to content

Commit 32680da

Browse files
xiongzhongjiangSaeed Mahameed
authored andcommitted
net/mlx5: Remove unneeded variable in mlx5_unload_one
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]>
1 parent cc4db57 commit 32680da

File tree

1 file changed

+1
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,8 +1228,6 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, bool boot)
12281228

12291229
static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup)
12301230
{
1231-
int err = 0;
1232-
12331231
if (cleanup) {
12341232
mlx5_unregister_device(dev);
12351233
mlx5_drain_health_wq(dev);
@@ -1257,7 +1255,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup)
12571255
mlx5_function_teardown(dev, cleanup);
12581256
out:
12591257
mutex_unlock(&dev->intf_state_mutex);
1260-
return err;
1258+
return 0;
12611259
}
12621260

12631261
static int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)

0 commit comments

Comments
 (0)