Skip to content

Commit 290a405

Browse files
amaramadgregkh
authored andcommitted
usb: typec: intel_pmc_mux: Un-register the USB role switch
Added missing code for un-register USB role switch in the remove and error path. Cc: Stable <[email protected]> # v5.8 Reviewed-by: Heikki Krogerus <[email protected]> Fixes: 6701adf ("usb: typec: driver for Intel PMC mux control") Signed-off-by: Madhusudanarao Amara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cfd54fa commit 290a405

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/typec/mux/intel_pmc_mux.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ static int pmc_usb_probe(struct platform_device *pdev)
497497
for (i = 0; i < pmc->num_ports; i++) {
498498
typec_switch_unregister(pmc->port[i].typec_sw);
499499
typec_mux_unregister(pmc->port[i].typec_mux);
500+
usb_role_switch_unregister(pmc->port[i].usb_sw);
500501
}
501502

502503
return ret;
@@ -510,6 +511,7 @@ static int pmc_usb_remove(struct platform_device *pdev)
510511
for (i = 0; i < pmc->num_ports; i++) {
511512
typec_switch_unregister(pmc->port[i].typec_sw);
512513
typec_mux_unregister(pmc->port[i].typec_mux);
514+
usb_role_switch_unregister(pmc->port[i].usb_sw);
513515
}
514516

515517
return 0;

0 commit comments

Comments
 (0)