summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5
diff options
context:
space:
mode:
authorChiara Meiohas <cmeiohas@nvidia.com>2024-10-31 15:36:50 +0200
committerLeon Romanovsky <leon@kernel.org>2024-11-04 06:57:20 -0500
commit6d9c7b272966f13ebbf39687620f395d97f4d15d (patch)
tree860844ba9969e4d2478287de09319f26e5cc87b1 /drivers/infiniband/hw/mlx5
parenteb3d354efb39576c86c1e659807c57c557f2f68a (diff)
RDMA/mlx5: Call dev_put() after the blocking notifier
Move dev_put() call to occur directly after the blocking notifier, instead of within the event handler. Fixes: 8d159eb2117b ("RDMA/mlx5: Use IB set_netdev and get_netdev functions") Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com> Link: https://patch.msgid.link/342ff94b3dcbb07da1c7dab862a73933d604b717.1730381292.git.leon@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index b4476df96ed5..5f7fe32b9051 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -3242,7 +3242,6 @@ static int lag_event(struct notifier_block *nb, unsigned long event, void *data)
}
err = ib_device_set_netdev(&dev->ib_dev, ndev,
portnum + 1);
- dev_put(ndev);
if (err)
return err;
/* Rescan gids after new netdev assignment */