media: v4l2-ioctl.c: don't copy back the result for -ENOTTY 76/175676/1
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 30 Jan 2018 08:50:01 +0000 (03:50 -0500)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 11 Apr 2018 09:34:15 +0000 (18:34 +0900)
commitea862d947841f4fc91f17a9c40daef7f37f993c8
tree944d1ae7eca6d10b34d4cf8882e1c4589b1a23ce
parent2cfc5a0c49ce08588441dc7fec209e1c10944721
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.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: <stable@vger.kernel.org> # for v4.15 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick from linux-3.18.y to apply CVE patch]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I74f89733fb3be9adb9ba8026be1dc699bed0445f
drivers/media/v4l2-core/v4l2-ioctl.c