phy: rockchip: inno-usb2: Destroy chg_worker on probe failure

Fixes: a78b174c2f ("phy: rockchip: inno-usb2: Fix DEBUG_LOCKS_WARN_ON in chg work")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I1f200c7597418d9c174bc68d9a5fea0703cd9cc5
This commit is contained in:
William Wu
2025-07-22 20:05:33 +08:00
committed by Tao Huang
parent 253e11f01f
commit d86fac4c44

View File

@@ -2634,6 +2634,16 @@ next_child:
return 0;
put_child:
for (index = 0; index < rphy->phy_cfg->num_ports; index++) {
struct rockchip_usb2phy_port *rport = &rphy->ports[index];
if (!rport->phy)
continue;
if (rport->port_id == USB2PHY_PORT_OTG && !IS_ERR_OR_NULL(rport->chg_worker))
kthread_destroy_worker(rport->chg_worker);
}
of_node_put(child_np);
disable_clks:
pm_runtime_put_sync(dev);