Signed-off-by: Hans de Goede <[email protected]>
---
 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;
-- 
1.7.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to