[PATCH 4/6] phy: zte: Add a zx29 USB PHY driver.
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Fri Nov 20 11:47:38 PST 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] phy: zte: OF node refcount leak in phy_zx29_probe() via wrong
helper
--
commit 15ae50d59e0e993615e70ce4fb99a2131fc91c46
Author: Stefan Dösinger <stefandoesinger at gmail.com>
phy: zte: Add a zx29 USB PHY driver.
This commit adds a PHY driver for the ZTE zx29 USB and HSIC PHYs to
handle reset sequencing and ready status polling in the topcrm syscon.
> diff --git a/drivers/phy/phy-zx29-usb.c b/drivers/phy/phy-zx29-usb.c
> new file mode 100644
> index 0000000000000..8dfbcb468c263
> --- /dev/null
> +++ b/drivers/phy/phy-zx29-usb.c
[ ... ]
> +static int phy_zx29_probe(struct platform_device *pdev)
> +{
> + struct phy_provider *phy_provider;
> + struct device *dev = &pdev->dev;
> + struct phy_zx29_drv_priv *priv;
> + unsigned int i;
> +
> + device_set_of_node_from_dev(dev, dev->parent);
[Severity: Medium]
Should this call platform_device_set_of_node_from_dev(pdev, dev->parent)
instead of device_set_of_node_from_dev()?
device_set_of_node_from_dev() takes a reference on dev->parent->of_node
and sets dev->of_node, but leaves pdev->dev.fwnode NULL. When the
platform device is released, platform_device_release() drops
pa->pdev.dev.fwnode rather than dev->of_node, leaking the OF node
reference.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-zx29usb-v1-0-b0433258e51b@gmail.com?part=4
More information about the linux-phy
mailing list