Commit a2b2ed2c authored by Andrew Morton's avatar Andrew Morton Committed by Dmitry Torokhov

Input: fix list iteration in input_release_device()

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent b53174fb
...@@ -236,10 +236,12 @@ EXPORT_SYMBOL(input_grab_device); ...@@ -236,10 +236,12 @@ EXPORT_SYMBOL(input_grab_device);
void input_release_device(struct input_handle *handle) void input_release_device(struct input_handle *handle)
{ {
if (handle->dev->grab == handle) { struct input_dev *dev = handle->dev;
handle->dev->grab = NULL;
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) if (handle->handler->start)
handle->handler->start(handle); handle->handler->start(handle);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment