diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-09-11 16:02:36 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-09-11 16:02:36 (GMT) |
commit | 53431d0a3534263168c8ee576bad1c2c3a4cd9e0 (patch) | |
tree | 84b3dda2e2409d1eda7c2273053c78cd6aa3a677 /drivers/input/evdev.c | |
parent | 01b944fe1cd4e21a2a9ed51adbdbafe2d5e905ba (diff) | |
parent | ade9c1a47c811a7ae1c874882ad9178af1ed1098 (diff) | |
download | linux-53431d0a3534263168c8ee576bad1c2c3a4cd9e0.tar.xz |
Merge branch 'next' into for-linus
Prepare second round of input updates for 4.3 merge window.
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 9d35499..08d4964 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -290,19 +290,14 @@ static int evdev_flush(struct file *file, fl_owner_t id) { 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 || client->revoked) - retval = -ENODEV; - else - retval = input_flush_device(&evdev->handle, file); + if (evdev->exist && !client->revoked) + input_flush_device(&evdev->handle, file); mutex_unlock(&evdev->mutex); - return retval; + return 0; } static void evdev_free(struct device *dev) |