提交 a2b2ed2c 编写于 作者: A Andrew Morton 提交者: Dmitry Torokhov

Input: fix list iteration in input_release_device()

Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 b53174fb
......@@ -236,10 +236,12 @@ EXPORT_SYMBOL(input_grab_device);
void input_release_device(struct input_handle *handle)
{
if (handle->dev->grab == handle) {
handle->dev->grab = NULL;
struct input_dev *dev = handle->dev;
if (dev->grab == handle) {
dev->grab = NULL;
list_for_each_entry(handle, &handle->dev->h_list, d_node)
list_for_each_entry(handle, &dev->h_list, d_node)
if (handle->handler->start)
handle->handler->start(handle);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册