]> Git Repo - J-linux.git/commitdiff
scsi: ufs: pltfrm: Dellocate HBA during ufshcd_pltfrm_remove()
authorManivannan Sadhasivam <[email protected]>
Mon, 11 Nov 2024 17:48:34 +0000 (23:18 +0530)
committerMartin K. Petersen <[email protected]>
Thu, 21 Nov 2024 03:03:06 +0000 (22:03 -0500)
This will ensure that the scsi host is cleaned up properly using
scsi_host_dev_release(). Otherwise, it may lead to memory leaks.

Cc: [email protected] # 4.4
Fixes: 03b1781aa978 ("[SCSI] ufs: Add Platform glue driver for ufshcd")
Signed-off-by: Manivannan Sadhasivam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Peter Wang <[email protected]>
Reviewed-by: Bean Huo <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/ufs/host/ufshcd-pltfrm.c

index b8dadd0a2f4c0010bceec9c6eaf595c015b4b107..505572d4fa878cdd3c14710a3f93f7c989ad1626 100644 (file)
@@ -534,6 +534,7 @@ void ufshcd_pltfrm_remove(struct platform_device *pdev)
 
        pm_runtime_get_sync(&pdev->dev);
        ufshcd_remove(hba);
+       ufshcd_dealloc_host(hba);
        pm_runtime_disable(&pdev->dev);
        pm_runtime_put_noidle(&pdev->dev);
 }
This page took 0.049934 seconds and 4 git commands to generate.