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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
2c6b222cee
commit
f14d4988c2
@@ -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;
|
||||
|
Reference in New Issue
Block a user