aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/evdev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-30 17:20:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-30 17:20:40 -0700
commit915ac4e26ef9c39a0f831e935509243732abedc0 (patch)
tree68ac39fbf077217583f9936eada2c072301becb6 /drivers/input/evdev.c
parentaa4af831bb4f3168f2f574b2620124699c09c4a3 (diff)
parente4dbedc7eac7da9db363a36f2bd4366962eeefcc (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "Some more updates for the input subsystem. You will get a fix for race in mousedev that has been causing quite a few oopses lately and a small fixup for force feedback support in evdev" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: mousedev - fix race when creating mixed device Input: don't modify the id of ioctl-provided ff effect on upload failure
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r--drivers/input/evdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index a06e12552886..ce953d895f5b 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -954,11 +954,13 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
return -EFAULT;
error = input_ff_upload(dev, &effect, file);
+ if (error)
+ return error;
if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
return -EFAULT;
- return error;
+ return 0;
}
/* Multi-number variable-length handlers */