summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSEO HOYOUNG <hy50.seo@samsung.com>2024-01-22 09:33:24 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2024-02-05 22:31:18 +0100
commit17e94b2585417e04dabc2f13bc03b4665ae687f3 (patch)
tree32c14978e76f455833e83c1ceaf1406b8c8bdfa1
parentscsi: ufs: core: Fix shift issue in ufshcd_clear_cmd() (diff)
downloadlinux-17e94b2585417e04dabc2f13bc03b4665ae687f3.tar.xz
linux-17e94b2585417e04dabc2f13bc03b4665ae687f3.zip
scsi: ufs: core: Remove the ufshcd_release() in ufshcd_err_handling_prepare()
If ufshcd_err_handler() is called in a suspend/resume situation, ufs_release() can be called twice and active_reqs end up going negative. This is because ufshcd_err_handling_prepare() and ufshcd_err_handling_unprepare() both call ufshcd_release(). Remove superfluous call to ufshcd_release(). Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com> Link: https://lore.kernel.org/r/20240122083324.11797-1-hy50.seo@samsung.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Can Guo <quic_cang@quicinc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/ufs/core/ufshcd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index c6cff4aa440a..d77b25b79ae3 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -6354,7 +6354,6 @@ static void ufshcd_err_handling_prepare(struct ufs_hba *hba)
ufshcd_hold(hba);
if (!ufshcd_is_clkgating_allowed(hba))
ufshcd_setup_clocks(hba, true);
- ufshcd_release(hba);
pm_op = hba->is_sys_suspended ? UFS_SYSTEM_PM : UFS_RUNTIME_PM;
ufshcd_vops_resume(hba, pm_op);
} else {