mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Input: uinput - unlock on allocation failure in ioctl
We have to unlock before returning if input_allocate_device() fails.
Fixes: 04ce40a61a ("Input: uinput - remove uinput_allocate_device()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
0145a7141e
commit
781f2dd0a5
1 changed files with 4 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue