Skip to content

Commit

Permalink
phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR()
Browse files Browse the repository at this point in the history
It should be 'qphy->vreg' passed to PTR_ERR() when devm_regulator_get() fails.

Fixes: 08e49af ("phy: qcom: Introduce M31 USB PHY driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Link: https://lore.kernel.org/r/20230824091345.1072650-1-yangyingliang@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Yang Yingliang authored and Vinod Koul committed Feb 7, 2024
1 parent 7936378 commit 95055be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/phy/qualcomm/phy-qcom-m31.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,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);
Expand Down

0 comments on commit 95055be

Please sign in to comment.