diff mbox series

[-next] phy: ingenic: Fix a typo in ingenic_usb_phy_probe()

Message ID 20210305034933.3240914-1-weiyongjun1@huawei.com
State Accepted
Commit 07789dc33f6f08f7061f6c088fd5ce1479e2f84b
Headers show
Series [-next] phy: ingenic: Fix a typo in ingenic_usb_phy_probe() | expand

Commit Message

Wei Yongjun March 5, 2021, 3:49 a.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

Fix the return value check typo which testing the wrong variable
in ingenic_usb_phy_probe().

Fixes: 31de313dfdcf ("PHY: Ingenic: Add USB PHY driver using generic PHY framework.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/phy/ingenic/phy-ingenic-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paul Cercueil March 7, 2021, 3:54 p.m. UTC | #1
Le ven. 5 mars 2021 à 3:49, 'Wei Yongjun <weiyongjun1@huawei.com> a 
écrit :
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix the return value check typo which testing the wrong variable
> in ingenic_usb_phy_probe().
> 
> Fixes: 31de313dfdcf ("PHY: Ingenic: Add USB PHY driver using generic 
> PHY framework.")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul

> ---
>  drivers/phy/ingenic/phy-ingenic-usb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/ingenic/phy-ingenic-usb.c 
> b/drivers/phy/ingenic/phy-ingenic-usb.c
> index ea127b177f46..28c28d816484 100644
> --- a/drivers/phy/ingenic/phy-ingenic-usb.c
> +++ b/drivers/phy/ingenic/phy-ingenic-usb.c
> @@ -352,8 +352,8 @@ static int ingenic_usb_phy_probe(struct 
> platform_device *pdev)
>  	}
> 
>  	priv->phy = devm_phy_create(dev, NULL, &ingenic_usb_phy_ops);
> -	if (IS_ERR(priv))
> -		return PTR_ERR(priv);
> +	if (IS_ERR(priv->phy))
> +		return PTR_ERR(priv->phy);
> 
>  	phy_set_drvdata(priv->phy, priv);
> 
>
Vinod Koul March 15, 2021, 10:31 a.m. UTC | #2
On 05-03-21, 03:49, 'Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Fix the return value check typo which testing the wrong variable
> in ingenic_usb_phy_probe().

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/phy/ingenic/phy-ingenic-usb.c b/drivers/phy/ingenic/phy-ingenic-usb.c
index ea127b177f46..28c28d816484 100644
--- a/drivers/phy/ingenic/phy-ingenic-usb.c
+++ b/drivers/phy/ingenic/phy-ingenic-usb.c
@@ -352,8 +352,8 @@  static int ingenic_usb_phy_probe(struct platform_device *pdev)
 	}
 
 	priv->phy = devm_phy_create(dev, NULL, &ingenic_usb_phy_ops);
-	if (IS_ERR(priv))
-		return PTR_ERR(priv);
+	if (IS_ERR(priv->phy))
+		return PTR_ERR(priv->phy);
 
 	phy_set_drvdata(priv->phy, priv);