From: Li Jun Date: Wed, 2 Jun 2021 09:57:08 +0000 (+0800) Subject: usb: typec: tcpm: cancel frs hrtimer when unregister tcpm port X-Git-Tag: v5.13-rc6~6^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ade4805e296c8d1e40c842395bbe478c7210555;p=thirdparty%2Flinux.git usb: typec: tcpm: cancel frs hrtimer when unregister tcpm port Like the state_machine_timer, we should also cancel possible pending frs hrtimer when unregister tcpm port. Fixes: 8dc4bd073663 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)") Cc: stable Reviewed-by: Guenter Roeck Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1622627829-11070-2-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 7ca452016e03a..a1382e878127f 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -6335,6 +6335,7 @@ void tcpm_unregister_port(struct tcpm_port *port) { int i; + hrtimer_cancel(&port->enable_frs_timer); hrtimer_cancel(&port->vdm_state_machine_timer); hrtimer_cancel(&port->state_machine_timer);