diff mbox series

[for-rc,1/3] RDMA/bnxt_re: Fix ib device unalloc

Message ID 1691642677-21369-2-git-send-email-selvin.xavier@broadcom.com (mailing list archive)
State Superseded
Commit 5363fc488da579923edf6a2fdca3d3b651dd800b
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/bnxt_re: Bug fixes | expand

Commit Message

Selvin Xavier Aug. 10, 2023, 4:44 a.m. UTC
ib_dealloc_device should be called only after device cleanup.
Fix the dealloc sequence.

Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index b42166f..1c76460 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -1526,8 +1526,8 @@  static void bnxt_re_remove(struct auxiliary_device *adev)
 	}
 	bnxt_re_setup_cc(rdev, false);
 	ib_unregister_device(&rdev->ibdev);
-	ib_dealloc_device(&rdev->ibdev);
 	bnxt_re_dev_uninit(rdev);
+	ib_dealloc_device(&rdev->ibdev);
 skip_remove:
 	mutex_unlock(&bnxt_re_mutex);
 }