aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2021-06-16 18:54:05 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-08-09 20:56:49 -0700
commit3c8946e0e2841aa7cbdabf6acaac6559fa8d1a49 (patch)
tree82cffe9b76eaa3c699a78677d2b16fed7888e0c6 /drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
parentnet/mlx5: Block switchdev mode while devlink traps are active (diff)
downloadlinux-dev-3c8946e0e2841aa7cbdabf6acaac6559fa8d1a49.tar.xz
linux-dev-3c8946e0e2841aa7cbdabf6acaac6559fa8d1a49.zip
net/mlx5: Fix order of functions in mlx5_irq_detach_nb()
Change order of functions in mlx5_irq_detach_nb() so it will be a mirror of mlx5_irq_attach_nb. Fixes: 71e084e26414 ("net/mlx5: Allocating a pool of MSI-X vectors for SFs") Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index b25f764daa08..95e60da33f03 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@ -251,8 +251,11 @@ int mlx5_irq_attach_nb(struct mlx5_irq *irq, struct notifier_block *nb)
int mlx5_irq_detach_nb(struct mlx5_irq *irq, struct notifier_block *nb)
{
+ int err = 0;
+
+ err = atomic_notifier_chain_unregister(&irq->nh, nb);
irq_put(irq);
- return atomic_notifier_chain_unregister(&irq->nh, nb);
+ return err;
}
struct cpumask *mlx5_irq_get_affinity_mask(struct mlx5_irq *irq)