From 07af64dddfb87d1af9360204155396be07b7aa70 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Thu, 28 Apr 2022 15:34:54 +0200 Subject: [PATCH] media: imon: fix timer racing disconnect The timer will report events for an input device. Reporting events for an unregistered device is bad. Hence the timer must be killed first. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/imon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 761b7fa57378..8dbeab48ed3c 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -2537,8 +2537,8 @@ static void imon_disconnect(struct usb_interface *interface) usb_kill_urb(ictx->rx_urb_intf1); usb_put_dev(ictx->usbdev_intf1); if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { - input_unregister_device(ictx->touch); del_timer_sync(&ictx->ttimer); + input_unregister_device(ictx->touch); } } -- 2.11.0