mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-06-01 23:23:46 -04:00
RDMA/irdma: Add missing mutex destroy
Add missing destroy of ah_tbl_lock and vchnl_mutex.
Fixes: d5edd33364 ("RDMA/irdma: RDMA/irdma: Add GEN3 core driver support")
Signed-off-by: Anil Samal <anil.samal@intel.com>
Signed-off-by: Krzysztof Czurylo <krzysztof.czurylo@intel.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Link: https://patch.msgid.link/20251125025350.180-6-tatyana.e.nikolova@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
committed by
Leon Romanovsky
parent
5eff1ecce3
commit
35bd787bab
@@ -302,7 +302,8 @@ static int icrdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary
|
||||
err_ctrl_init:
|
||||
icrdma_deinit_interrupts(rf, cdev_info);
|
||||
err_init_interrupts:
|
||||
kfree(iwdev->rf);
|
||||
mutex_destroy(&rf->ah_tbl_lock);
|
||||
kfree(rf);
|
||||
ib_dealloc_device(&iwdev->ibdev);
|
||||
|
||||
return err;
|
||||
@@ -319,6 +320,7 @@ static void icrdma_remove(struct auxiliary_device *aux_dev)
|
||||
ice_rdma_update_vsi_filter(cdev_info, iwdev->vsi_num, false);
|
||||
irdma_ib_unregister_device(iwdev);
|
||||
icrdma_deinit_interrupts(iwdev->rf, cdev_info);
|
||||
mutex_destroy(&iwdev->rf->ah_tbl_lock);
|
||||
|
||||
kfree(iwdev->rf);
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ static int ig3rdma_vchnl_init(struct irdma_pci_f *rf,
|
||||
ret = irdma_sc_vchnl_init(&rf->sc_dev, &virt_info);
|
||||
if (ret) {
|
||||
destroy_workqueue(rf->vchnl_wq);
|
||||
mutex_destroy(&rf->sc_dev.vchnl_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -124,7 +125,9 @@ static void ig3rdma_decfg_rf(struct irdma_pci_f *rf)
|
||||
{
|
||||
struct irdma_hw *hw = &rf->hw;
|
||||
|
||||
mutex_destroy(&rf->ah_tbl_lock);
|
||||
destroy_workqueue(rf->vchnl_wq);
|
||||
mutex_destroy(&rf->sc_dev.vchnl_mutex);
|
||||
kfree(hw->io_regs);
|
||||
iounmap(hw->rdma_reg.addr);
|
||||
}
|
||||
@@ -149,6 +152,7 @@ static int ig3rdma_cfg_rf(struct irdma_pci_f *rf,
|
||||
err = ig3rdma_cfg_regions(&rf->hw, cdev_info);
|
||||
if (err) {
|
||||
destroy_workqueue(rf->vchnl_wq);
|
||||
mutex_destroy(&rf->sc_dev.vchnl_mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -5506,7 +5506,9 @@ void irdma_ib_dealloc_device(struct ib_device *ibdev)
|
||||
irdma_rt_deinit_hw(iwdev);
|
||||
if (!iwdev->is_vport) {
|
||||
irdma_ctrl_deinit_hw(iwdev->rf);
|
||||
if (iwdev->rf->vchnl_wq)
|
||||
if (iwdev->rf->vchnl_wq) {
|
||||
destroy_workqueue(iwdev->rf->vchnl_wq);
|
||||
mutex_destroy(&iwdev->rf->sc_dev.vchnl_mutex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user