mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user