LKML Archive on lore.kernel.org
 help / color / Atom feed
* [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	[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, back to index

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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git