Skip to contentSkip to conversation

phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR()

PATCH Applied Yang Yingliang 3 participants 3 messages Aug 24, 2023 – Sep 21, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR()

It should be 'qphy->vreg' passed to PTR_ERR() when devm_regulator_get() fails.

Fixes 08e49af50701 ("phy: qcom: Introduce M31 USB PHY driver")
---
 drivers/phy/qualcomm/phy-qcom-m31.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-m31.c +1 -1
index ed08072ca032..99d570f4142a 100644
@@ -256,7 +256,7 @@ static int m31usb_phy_probe(struct platform_device *pdev)
 
 	qphy->vreg = devm_regulator_get(dev, "vdda-phy");
 	if (IS_ERR(qphy->vreg))
-		return dev_err_probe(dev, PTR_ERR(qphy->phy),
+		return dev_err_probe(dev, PTR_ERR(qphy->vreg),
 						"failed to get vreg\n");
 
 	phy_set_drvdata(qphy->phy, qphy);
Signature · 7 lines
2.25.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Yang Yingliang

It should be 'qphy->vreg' passed to PTR_ERR() when devm_regulator_get() fails.

Fixes 08e49af50701 ("phy: qcom: Introduce M31 USB PHY driver")
---
 drivers/phy/qualcomm/phy-qcom-m31.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/qualcomm/phy-qcom-m31.c +0 -0
index ed08072ca032..99d570f4142a 100644

drivers/phy/qualcomm/phy-qcom-m31.c static int m31usb_phy_probe(struct platform_device *pdev) · line 260

Quoted 6 lines
drivers/phy/qualcomm/phy-qcom-m31.c +1 -1
@@ -256,7 +256,7 @@ static int m31usb_phy_probe(struct platform_device *pdev)
 
 	qphy->vreg = devm_regulator_get(dev, "vdda-phy");
 	if (IS_ERR(qphy->vreg))
-		return dev_err_probe(dev, PTR_ERR(qphy->phy),
+		return dev_err_probe(dev, PTR_ERR(qphy->vreg),
 						"failed to get vreg\n");

Thanks
Varada

Quoted 5 lines
drivers/phy/qualcomm/phy-qcom-m31.c +0 -0
 	phy_set_drvdata(qphy->phy, qphy);
Signature · 1 line
2.25.1
Signature · 3 lines
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
maintainer Applied
#2 lore raw
In reply to Yang Yingliang
Quoted 3 lines · Yang Yingliang

It should be 'qphy->vreg' passed to PTR_ERR() when devm_regulator_get() fails.

Applied, thanks!

[1/1] phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR()

      commit: 5f7cd740a6b657fba775bde744496e5ed21851ca

Best regards,

Signature · 8 lines
~Vinod



-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy