[PATCH] phy: broadcom: brcm-usb: unwind clocks on probe failure

Justin Chen justin.chen at broadcom.com
Mon Sep 14 12:33:25 PDT 2026



On 9/12/26 6:29 PM, Myeonghun Pak wrote:
> brcm_usb_phy_dvr_init() enables the optional USB2 and USB3 clocks before
> creating all PHYs and acquiring the remaining probe resources.  Several
> later failures return without disabling clocks that were already enabled,
> and deferred probe retries can keep increasing their enable counts.
> 
> Track each successful clock enable and unwind only those clocks, in reverse
> order, when initialization fails.  Keep the existing successful probe path
> unchanged.  This is limited to the BCM4908 and Broadcom STB USB PHY driver.
> 
> This issue was identified during our ongoing static-analysis research while
> reviewing kernel code.
> 
> Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver")
> Assisted-by: OpenAI:GPT-5.6
> Co-developed-by: Ijae Kim <ae878000 at gmail.com>
> Signed-off-by: Ijae Kim <ae878000 at gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512 at gmail.com>
Reviewed-by: Justin Chen <justin.chen at broadcom.com>



More information about the linux-phy mailing list