Re: [PATCH] phy: nuvoton: Fix clock reference leak in ma35_usb_phy_probe()
From: Manivannan Sadhasivam
Date: Mon Oct 12 2026 - 12:30:33 EST
On Thu, Sep 17, 2026 at 01:43:53PM +0000, Wentao Liang wrote:
> ma35_usb_phy_probe() obtains the USB PHY clock with of_clk_get(), but
> returns without calling clk_put() when devm_phy_create() or
> devm_of_phy_provider_register() fails, leaking the reference. The
> clock is only meant to be kept on the success path, where it is stored
> in p_phy->clk and used by the PHY operations.
>
> Drop the reference on those two error paths.
>
> Fixes: b48baf69db97 ("phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
- Mani
--
மணிவண்ணன் சதாசிவம்