From 57fb4a4831793de9e8dbdfc8dc5eb8796026d47e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 8 Apr 2012 12:59:48 -0300 Subject: [PATCH] =?utf8?q?[media]=20uvcvideo:=20Fix=20a=20"ignoring=20retu?= =?utf8?q?rn=20value=20of=20=E2=80=98=5F=5Fclear=5Fuser=E2=80=99"=20warnin?= =?utf8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Hans de Goede Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/uvc/uvc_v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index 111bfff1640d..4ef21e9cb28c 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c @@ -1097,7 +1097,8 @@ static int uvc_v4l2_put_xu_mapping(const struct uvc_xu_control_mapping *kp, __put_user(kp->menu_count, &up->menu_count)) return -EFAULT; - __clear_user(up->reserved, sizeof(up->reserved)); + if (__clear_user(up->reserved, sizeof(up->reserved))) + return -EFAULT; if (kp->menu_count == 0) return 0; -- 2.30.2