* [PATCH] phy: qcom-ufs: Fix wrong return value in ufs_qcom_phy_calibrate()
@ 2020-08-02 11:15 Tianjia Zhang
2020-08-04 6:05 ` Bjorn Andersson
0 siblings, 1 reply; 2+ messages in thread
From: Tianjia Zhang @ 2020-08-02 11:15 UTC (permalink / raw)
To: agross, bjorn.andersson, kishon, vkoul, dovl, ygardi
Cc: linux-arm-msm, linux-kernel, tianjia.zhang
On an error exit path, a negative error code should be returned
instead of a positive return value.
Fixes: adaafaa393ef1 ("phy: qcom-ufs: add support for QUALCOMM Technologies UFS PHY drivers")
Cc: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
drivers/phy/qualcomm/phy-qcom-ufs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-ufs.c b/drivers/phy/qualcomm/phy-qcom-ufs.c
index 763c8d396af1..49d47dc5bfd4 100644
--- a/drivers/phy/qualcomm/phy-qcom-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-ufs.c
@@ -24,7 +24,7 @@ int ufs_qcom_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
if (!tbl_A) {
dev_err(ufs_qcom_phy->dev, "%s: tbl_A is NULL", __func__);
- ret = EINVAL;
+ ret = -EINVAL;
goto out;
}
@@ -42,7 +42,7 @@ int ufs_qcom_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
if (!tbl_B) {
dev_err(ufs_qcom_phy->dev, "%s: tbl_B is NULL",
__func__);
- ret = EINVAL;
+ ret = -EINVAL;
goto out;
}
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: qcom-ufs: Fix wrong return value in ufs_qcom_phy_calibrate()
2020-08-02 11:15 [PATCH] phy: qcom-ufs: Fix wrong return value in ufs_qcom_phy_calibrate() Tianjia Zhang
@ 2020-08-04 6:05 ` Bjorn Andersson
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2020-08-04 6:05 UTC (permalink / raw)
To: Tianjia Zhang
Cc: agross, kishon, vkoul, dovl, ygardi, linux-arm-msm, linux-kernel,
tianjia.zhang
On Sun 02 Aug 04:15 PDT 2020, Tianjia Zhang wrote:
> On an error exit path, a negative error code should be returned
> instead of a positive return value.
>
> Fixes: adaafaa393ef1 ("phy: qcom-ufs: add support for QUALCOMM Technologies UFS PHY drivers")
> Cc: Yaniv Gardi <ygardi@codeaurora.org>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Thanks for your patch Tianjia.
The support provided by this driver was added to phy-qcom-qmp.c a while
back and in what's will become 5.9 the phy-qcom-ufs.c driver is removed.
So your change is unfortunately no longer needed.
Regards,
Bjorn
> ---
> drivers/phy/qualcomm/phy-qcom-ufs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-ufs.c b/drivers/phy/qualcomm/phy-qcom-ufs.c
> index 763c8d396af1..49d47dc5bfd4 100644
> --- a/drivers/phy/qualcomm/phy-qcom-ufs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-ufs.c
> @@ -24,7 +24,7 @@ int ufs_qcom_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
>
> if (!tbl_A) {
> dev_err(ufs_qcom_phy->dev, "%s: tbl_A is NULL", __func__);
> - ret = EINVAL;
> + ret = -EINVAL;
> goto out;
> }
>
> @@ -42,7 +42,7 @@ int ufs_qcom_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
> if (!tbl_B) {
> dev_err(ufs_qcom_phy->dev, "%s: tbl_B is NULL",
> __func__);
> - ret = EINVAL;
> + ret = -EINVAL;
> goto out;
> }
>
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-04 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-02 11:15 [PATCH] phy: qcom-ufs: Fix wrong return value in ufs_qcom_phy_calibrate() Tianjia Zhang
2020-08-04 6:05 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).