projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0145a71
)
Input: uinput - unlock on allocation failure in ioctl
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 10 Nov 2017 18:21:53 +0000
(10:21 -0800)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Fri, 10 Nov 2017 18:29:53 +0000
(10:29 -0800)
We have to unlock before returning if input_allocate_device() fails.
Fixes: 04ce40a61a91 ("Input: uinput - remove uinput_allocate_device()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/uinput.c
patch
|
blob
|
history
diff --git
a/drivers/input/misc/uinput.c
b/drivers/input/misc/uinput.c
index 7b41aad7ec2771b9d6ccf81e32223c7bbcb57889..39ddd9a73febb7f4c3d9b70d9422afcc51c42f02 100644
(file)
--- a/
drivers/input/misc/uinput.c
+++ b/
drivers/input/misc/uinput.c
@@
-857,8
+857,10
@@
static long uinput_ioctl_handler(struct file *file, unsigned int cmd,
if (!udev->dev) {
udev->dev = input_allocate_device();
- if (!udev->dev)
- return -ENOMEM;
+ if (!udev->dev) {
+ retval = -ENOMEM;
+ goto out;
+ }
}
switch (cmd) {