summaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-07-15 01:17:38 -0400
committerDmitry Torokhov <dtor@insightbb.com>2006-07-15 01:17:38 -0400
commita2b2ed2ce20ae6c335a27ae5bf8580f385014e70 (patch)
treeca0ba68a0dd8dfc1e737cc41ca686d91e269aa0a /drivers/input/input.c
parentb53174fb5a0e47a19e10b8ef74ab0c12a19f92dc (diff)
downloadlinux-stable-a2b2ed2ce20ae6c335a27ae5bf8580f385014e70.tar.gz
linux-stable-a2b2ed2ce20ae6c335a27ae5bf8580f385014e70.tar.bz2
linux-stable-a2b2ed2ce20ae6c335a27ae5bf8580f385014e70.zip
Input: fix list iteration in input_release_device()
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index e20913942927..9c98b6d6848b 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -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);
}