[bug report] phy: qcom: Introduce M31 USB PHY driver
Vinod Koul
vkoul at kernel.org
Wed Feb 7 01:10:06 PST 2024
On 06-02-24, 13:22, Dan Carpenter wrote:
> The patch 08e49af50701: "phy: qcom: Introduce M31 USB PHY driver"
> from Aug 14, 2023 (linux-next), leads to the following Smatch static
> checker warning:
>
> drivers/phy/qualcomm/phy-qcom-m31.c:302 m31usb_phy_probe()
> warn: passing zero to 'PTR_ERR'
>
> drivers/phy/qualcomm/phy-qcom-m31.c
> 294
> 295 qphy->phy = devm_phy_create(dev, NULL, &m31usb_phy_gen_ops);
> 296 if (IS_ERR(qphy->phy))
> 297 return dev_err_probe(dev, PTR_ERR(qphy->phy),
> 298 "failed to create phy\n");
> 299
> 300 qphy->vreg = devm_regulator_get(dev, "vdda-phy");
> 301 if (IS_ERR(qphy->vreg))
> --> 302 return dev_err_probe(dev, PTR_ERR(qphy->phy),
> ^^^
> This should have been "qphy->vreg".
>
> 303 "failed to get vreg\n");
> 304
>
> I can't work out what happened here.
>
> This was fixed in commit 5f7cd740a6b6 ("phy: qcom: phy-qcom-m31: fix
> wrong pointer pass to PTR_ERR()") but somehow it got changed back. I've
> looked at the git log and I don't see how that happened...
I think there might have been merge issue b/w the change of error
message indentation and this patch, that is the only thing I can this
of...
I have picked this one again, thanks for reporting
--
~Vinod
More information about the linux-phy
mailing list