From: Chanwoo Lee <cw9316.lee@samsung.com>
To: agross@kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.org, mani@kernel.org, jejb@linux.ibm.com,
martin.petersen@oracle.com, quic_asutoshd@quicinc.com,
dmitry.baryshkov@linaro.org, ahalaney@redhat.com,
linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: grant.jung@samsung.com, jt77.jang@samsung.com,
dh0421.hwang@samsung.com, sh043.lee@samsung.com,
ChanWoo Lee <cw9316.lee@samsung.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: [PATCH v3] scsi: ufs: qcom: Return ufs_qcom_clk_scale_*() errors in ufs_qcom_clk_scale_notify()
Date: Fri, 15 Dec 2023 09:38:12 +0900 [thread overview]
Message-ID: <20231215003812.29650-1-cw9316.lee@samsung.com> (raw)
In-Reply-To: CGME20231215003817epcas1p21127357982772ebe0e84b86f20115186@epcas1p2.samsung.com
From: ChanWoo Lee <cw9316.lee@samsung.com>
In commit 031312dbc695 ("scsi: ufs: ufs-qcom: Remove unnecessary goto statements")
the error handling was accidentally changed, resulting in the error of
ufs_qcom_clk_scale_*() calls not being returned.
This is the case I checked.
* ufs_qcom_clk_scale_notify -> 'ufs_qcom_clk_scale_up_/down_pre_change' error -> return 0;
Let's make sure those errors are properly returned.
Fixes: 031312dbc695 ("scsi: ufs: ufs-qcom: Remove unnecessary goto statements")
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
---
* v2->v3: Change title and description
v2 :
https://patchwork.kernel.org/project/linux-scsi/patch/20231214021401.26474-1-cw9316.lee@samsung.com/
* v1->v2: Remove things already in progress
v1 :
https://patchwork.kernel.org/project/linux-scsi/patch/20231213022500.9011-1-cw9316.lee@samsung.com/
---
---
drivers/ufs/host/ufs-qcom.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 96cb8b5b4e66..17e24270477d 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1516,9 +1516,11 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba,
err = ufs_qcom_clk_scale_up_pre_change(hba);
else
err = ufs_qcom_clk_scale_down_pre_change(hba);
- if (err)
- ufshcd_uic_hibern8_exit(hba);
+ if (err) {
+ ufshcd_uic_hibern8_exit(hba);
+ return err;
+ }
} else {
if (scale_up)
err = ufs_qcom_clk_scale_up_post_change(hba);
--
2.29.0
next parent reply other threads:[~2023-12-15 0:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231215003817epcas1p21127357982772ebe0e84b86f20115186@epcas1p2.samsung.com>
2023-12-15 0:38 ` Chanwoo Lee [this message]
2023-12-15 15:05 ` [PATCH v3] scsi: ufs: qcom: Return ufs_qcom_clk_scale_*() errors in ufs_qcom_clk_scale_notify() Andrew Halaney
2023-12-19 2:19 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231215003812.29650-1-cw9316.lee@samsung.com \
--to=cw9316.lee@samsung.com \
--cc=agross@kernel.org \
--cc=ahalaney@redhat.com \
--cc=andersson@kernel.org \
--cc=dh0421.hwang@samsung.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=grant.jung@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=jt77.jang@samsung.com \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=quic_asutoshd@quicinc.com \
--cc=sh043.lee@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.