Re: [PATCH] phy: broadcom: brcm-usb: unwind clocks on probe failure
From: Justin Chen
Date: Mon Sep 14 2026 - 15:33:40 EST
On 9/12/26 6:29 PM, Myeonghun Pak wrote:
brcm_usb_phy_dvr_init() enables the optional USB2 and USB3 clocks beforeReviewed-by: Justin Chen <justin.chen@xxxxxxxxxxxx>
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@xxxxxxxxx>
Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>