hisi_inno_phy_probe() acquires an exclusive UTMI reset control for each child node but never releases it on probe failure or driver detach. The leaked controls remain acquired, so a later probe can fail with -EBUSY when requesting the same resets. Register a devres action after each successful lookup to release the control on probe failure and detach. Found during source review of reset-control lifetimes. Build-tested the driver object on x86_64 with W=1 and reset support enabled. No hardware testing. Fixes: ba8b0ee81fbb ("phy: add inno-usb2-phy driver for hi3798cv200 SoC") Cc: stable@vger.kernel.org # needs of_node_put(child) on <= 6.6 Signed-off-by: Xia Yan --- drivers/phy/hisilicon/phy-hisi-inno-usb2.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c index c843923252aa..9bf207e3e692 100644 --- a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c +++ b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c @@ -132,6 +132,11 @@ static const struct phy_ops hisi_inno_phy_ops = { .owner = THIS_MODULE, }; +static void hisi_inno_phy_reset_put(void *data) +{ + reset_control_put(data); +} + static int hisi_inno_phy_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -169,6 +174,10 @@ static int hisi_inno_phy_probe(struct platform_device *pdev) if (IS_ERR(rst)) return PTR_ERR(rst); + ret = devm_add_action_or_reset(dev, hisi_inno_phy_reset_put, rst); + if (ret) + return ret; + priv->ports[i].utmi_rst = rst; priv->ports[i].priv = priv; base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4