summaryrefslogtreecommitdiff
path: root/drivers/media/usb/uvc/uvc_video.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-01-16 20:45:36 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-23 10:23:24 +0300
commitf14d4988c28e5243e43ba792ee34994951240b0f (patch)
tree3e621c2b3cb8b9eae8ae5da96b0056a781a60ae9 /drivers/media/usb/uvc/uvc_video.c
parent2c6b222cee2d68e30f059b8ca9194532416bb3f4 (diff)
downloadlinux-f14d4988c28e5243e43ba792ee34994951240b0f.tar.xz
media: uvcvideo: Use parentheses around sizeof operand
While the sizeof is an operator and not a function, the preferred coding style in the kernel is to enclose its operand in parentheses. To avoid mixing multiple coding styles in the driver, use parentheses around all sizeof operands. While at it replace a kmalloc() with a kmalloc_array() to silence a checkpatch warning triggered by this patch. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_video.c')
-rw-r--r--drivers/media/usb/uvc/uvc_video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index dfe13c55a067..2ddb1367e195 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -191,7 +191,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
uvc_warn_once(stream->dev, UVC_WARN_MINMAX, "UVC non "
"compliance - GET_MIN/MAX(PROBE) incorrectly "
"supported. Enabling workaround.\n");
- memset(ctrl, 0, sizeof *ctrl);
+ memset(ctrl, 0, sizeof(*ctrl));
ctrl->wCompQuality = le16_to_cpup((__le16 *)data);
ret = 0;
goto out;