Re: [PATCH 05/10] uvcvideo: Fix a "ignoring return value of ‘__clear_user’" warning

Laurent Pinchart
2012-03-27T15:48:04Z

Hi Hans,

Thanks for the patch.

On Sunday 25 March 2012 13:56:45 Hans de Goede wrote:
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> 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 ff2cddd..8db90ef 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;

--
Regards,

Laurent Pinchart