Message ID | 7926c8e6-630e-4d7a-b0b2-d29b3c8b2c09@moroto.mountain |
---|---|
State | New |
Headers | show |
Series | phy: qcom-m31: Fix error code in probe() | expand |
On Thu, Sep 07, 2023 at 12:54:39PM +0300, Dan Carpenter wrote: > This accidentally returns the wrong variable. It should be "qphy->vreg" > instead of "qphy->phy". > > Fixes: 08e49af50701 ("phy: qcom: Introduce M31 USB PHY driver") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > --- > When we're adding new drivers then we should use the new driver > prefix instead of the subsystem prefix. For example: > > Bad: [PATCH] phy: qcom: Introduce M31 USB PHY driver > Good: [PATCH] phy: qcom-m31: Introduce M31 USB PHY driver > > That way it's obvious to the first person who sends a bugfix > what the driver prefix is. > > drivers/phy/qualcomm/phy-qcom-m31.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-m31.c b/drivers/phy/qualcomm/phy-qcom-m31.c > index ed08072ca032..99d570f4142a 100644 > --- a/drivers/phy/qualcomm/phy-qcom-m31.c > +++ b/drivers/phy/qualcomm/phy-qcom-m31.c > @@ -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); > -- > 2.39.2 I believe this is addressed by https://lore.kernel.org/linux-arm-msm/20230824091345.1072650-1-yangyingliang@huawei.com/ Thanks Varada
diff --git a/drivers/phy/qualcomm/phy-qcom-m31.c b/drivers/phy/qualcomm/phy-qcom-m31.c index ed08072ca032..99d570f4142a 100644 --- a/drivers/phy/qualcomm/phy-qcom-m31.c +++ b/drivers/phy/qualcomm/phy-qcom-m31.c @@ -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);
This accidentally returns the wrong variable. It should be "qphy->vreg" instead of "qphy->phy". Fixes: 08e49af50701 ("phy: qcom: Introduce M31 USB PHY driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- When we're adding new drivers then we should use the new driver prefix instead of the subsystem prefix. For example: Bad: [PATCH] phy: qcom: Introduce M31 USB PHY driver Good: [PATCH] phy: qcom-m31: Introduce M31 USB PHY driver That way it's obvious to the first person who sends a bugfix what the driver prefix is. drivers/phy/qualcomm/phy-qcom-m31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)