mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
media: v4l2-ioctl.c: don't copy back the result for -ENOTTY
commit 181a4a2d5a0a7b43cab08a70710d727e7764ccdd upstream. If the ioctl returned -ENOTTY, then don't bother copying back the result as there is no point. Change-Id: I88b433a1623358b5e2e368ad391534da1e88f04a Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
b374f278f9
commit
72cb1fb398
1 changed files with 3 additions and 1 deletions
|
@ -2397,8 +2397,10 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
|
|||
|
||||
/* Handles IOCTL */
|
||||
err = func(file, cmd, parg);
|
||||
if (err == -ENOIOCTLCMD)
|
||||
if (err == -ENOTTY || err == -ENOIOCTLCMD) {
|
||||
err = -ENOTTY;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (has_array_args) {
|
||||
*kernel_ptr = user_ptr;
|
||||
|
|
Loading…
Reference in a new issue