提交 07af64dd 编写于 作者: O Oliver Neukum 提交者: Mauro Carvalho Chehab

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: NOliver Neukum <oneukum@suse.com>
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 a43617a5
...@@ -2537,8 +2537,8 @@ static void imon_disconnect(struct usb_interface *interface) ...@@ -2537,8 +2537,8 @@ static void imon_disconnect(struct usb_interface *interface)
usb_kill_urb(ictx->rx_urb_intf1); usb_kill_urb(ictx->rx_urb_intf1);
usb_put_dev(ictx->usbdev_intf1); usb_put_dev(ictx->usbdev_intf1);
if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) {
input_unregister_device(ictx->touch);
del_timer_sync(&ictx->ttimer); del_timer_sync(&ictx->ttimer);
input_unregister_device(ictx->touch);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册