diff options
| -rw-r--r-- | drivers/input/input.c | 8 |
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); | |||
| 236 | 236 | ||
| 237 | void input_release_device(struct input_handle *handle) | 237 | void input_release_device(struct input_handle *handle) |
| 238 | { | 238 | { |
| 239 | if (handle->dev->grab == handle) { | 239 | struct input_dev *dev = handle->dev; |
| 240 | handle->dev->grab = NULL; | 240 | |
| 241 | if (dev->grab == handle) { | ||
| 242 | dev->grab = NULL; | ||
| 241 | 243 | ||
| 242 | list_for_each_entry(handle, &handle->dev->h_list, d_node) | 244 | list_for_each_entry(handle, &dev->h_list, d_node) |
| 243 | if (handle->handler->start) | 245 | if (handle->handler->start) |
| 244 | handle->handler->start(handle); | 246 | handle->handler->start(handle); |
| 245 | } | 247 | } |
