git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RDMA/ucma: Check that device exists prior to accessing it
[pandora-kernel.git]
/
drivers
/
input
/
evdev.c
diff --git
a/drivers/input/evdev.c
b/drivers/input/evdev.c
index
4cf2534
..
f55a3cf
100644
(file)
--- a/
drivers/input/evdev.c
+++ b/
drivers/input/evdev.c
@@
-126,19
+126,14
@@
static int evdev_flush(struct file *file, fl_owner_t id)
{
struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev;
{
struct evdev_client *client = file->private_data;
struct evdev *evdev = client->evdev;
- int retval;
- retval = mutex_lock_interruptible(&evdev->mutex);
- if (retval)
- return retval;
+ mutex_lock(&evdev->mutex);
- if (!evdev->exist)
- retval = -ENODEV;
- else
- retval = input_flush_device(&evdev->handle, file);
+ if (evdev->exist)
+ input_flush_device(&evdev->handle, file);
mutex_unlock(&evdev->mutex);
mutex_unlock(&evdev->mutex);
- return
retval
;
+ return
0
;
}
static void evdev_free(struct device *dev)
}
static void evdev_free(struct device *dev)