Browse Source

[media] uvcvideo: Fix a "ignoring return value of ‘__clear_user’" warning

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede 13 years ago
parent
commit
57fb4a4831
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/media/video/uvc/uvc_v4l2.c

+ 2 - 1
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;