Re: [PATCH] phy: broadcom: brcm-usb: unwind late probe failures

From: Justin Chen

Date: Mon Jun 15 2026 - 14:23:03 EST




On 6/15/26 12:01 AM, Pengpeng Hou wrote:
brcm_usb_phy_probe() registers a PM notifier and may create a sysfs group
before registering the OF PHY provider. If provider registration fails,
probe returns the error with those resources still active.

Track which optional resources were installed and remove them on the late
provider-registration failure path. Use the same state in remove() so
cleanup matches probe progress.

Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>

Reviewed-by: Justin Chen <justin.chen@xxxxxxxxxxxx>