diff mbox series

[vfio,2/2] vfio/mlx5: Destroy the state_mutex on release

Message ID 20231122193203.26127-3-brett.creeley@amd.com (mailing list archive)
State New, archived
Headers show
Series vfio/mlx5: locking updates | expand

Commit Message

Brett Creeley Nov. 22, 2023, 7:32 p.m. UTC
The state_mutex is initialized in vfio init, but
never destroyed. This isn't required as mutex_destroy()
doesn't do anything unless lock debugging is enabled.
However, for completeness, fix it.

No fixes tag is added as it doesn't seem worthwhile
for such a trivial and debug only change.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
---
 drivers/vfio/pci/mlx5/cmd.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/vfio/pci/mlx5/cmd.c b/drivers/vfio/pci/mlx5/cmd.c
index 5cf68ab2bbd7..4ae5295757b4 100644
--- a/drivers/vfio/pci/mlx5/cmd.c
+++ b/drivers/vfio/pci/mlx5/cmd.c
@@ -203,6 +203,7 @@  void mlx5vf_cmd_remove_migratable(struct mlx5vf_pci_core_device *mvdev)
 						&mvdev->nb);
 	destroy_workqueue(mvdev->cb_wq);
 	mutex_destroy(&mvdev->reset_mutex);
+	mutex_destroy(&mvdev->state_mutex);
 }
 
 void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev,