diff options
| author | Kalesh AP <kalesh-anakkur.purayil@broadcom.com> | 2025-02-04 00:21:24 -0800 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2025-02-10 03:39:25 -0500 |
| commit | e2f105277411c4ebacd00d4ae1a57f693ba7d22d (patch) | |
| tree | 5e4e9a1887802aec9b4434083db343097616bac4 /drivers/infiniband/hw/bnxt_re/main.c | |
| parent | RDMA/bnxt_re: Add sanity checks on rdev validity (diff) | |
| download | linux-e2f105277411c4ebacd00d4ae1a57f693ba7d22d.tar.gz linux-e2f105277411c4ebacd00d4ae1a57f693ba7d22d.zip | |
RDMA/bnxt_re: Fix issue in the unload path
The cited comment removed the netdev notifier register call
from the driver. But, it did not remove the cleanup code from
the unload path. As a result, driver unload is not clean and
resulted in undesired behaviour.
Fixes: d3b15fcc4201 ("RDMA/bnxt_re: Remove deliver net device event")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/1738657285-23968-4-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/main.c')
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/main.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 89ac5c21ca7a..a94c8c5387d9 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1359,7 +1359,6 @@ static struct bnxt_re_dev *bnxt_re_dev_add(struct auxiliary_device *adev, return NULL; } /* Default values */ - rdev->nb.notifier_call = NULL; rdev->netdev = en_dev->net; rdev->en_dev = en_dev; rdev->adev = adev; @@ -2354,15 +2353,6 @@ exit: static void bnxt_re_remove_device(struct bnxt_re_dev *rdev, u8 op_type, struct auxiliary_device *aux_dev) { - if (rdev->nb.notifier_call) { - unregister_netdevice_notifier(&rdev->nb); - rdev->nb.notifier_call = NULL; - } else { - /* If notifier is null, we should have already done a - * clean up before coming here. - */ - return; - } bnxt_re_setup_cc(rdev, false); ib_unregister_device(&rdev->ibdev); bnxt_re_dev_uninit(rdev, op_type); |
