Skip to content

Commit

Permalink
Input: fix list iteration in input_release_device()
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Andrew Morton authored and Dmitry Torokhov committed Jul 15, 2006
1 parent b53174f commit a2b2ed2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a2b2ed2

Please sign in to comment.