[PATCH] phy: nuvoton: Fix clock reference leak in ma35_usb_phy_probe()
Manivannan Sadhasivam
mani at kernel.org
Mon Oct 12 09:10:33 PDT 2026
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 at vger.kernel.org
> Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
- Mani
--
மணிவண்ணன் சதாசிவம்
More information about the linux-phy
mailing list