summaryrefslogtreecommitdiff
path: root/drivers/media/test-drivers
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2021-01-11 15:54:44 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-27 13:21:44 +0100
commited2fb2f57430dfb030aaecd92bced752d999dd2f (patch)
tree4ecd24d3c084697a726abe39e352abf0d1101327 /drivers/media/test-drivers
parentb7d2c99a69a1de0e08e8c463b58ff2faf910a7cd (diff)
media: vicodec: Do not zero reserved fields
Core code already clears reserved fields of struct v4l2_pix_format_mplane, check commit 4e1e0eb0e074 ("media: v4l2-ioctl: Zero v4l2_plane_pix_format reserved fields"). Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers')
-rw-r--r--drivers/media/test-drivers/vicodec/vicodec-core.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c
index 025f3ff77302..33f1c893c1b6 100644
--- a/drivers/media/test-drivers/vicodec/vicodec-core.c
+++ b/drivers/media/test-drivers/vicodec/vicodec-core.c
@@ -811,9 +811,6 @@ static int vidioc_g_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f)
pix_mp->xfer_func = ctx->state.xfer_func;
pix_mp->ycbcr_enc = ctx->state.ycbcr_enc;
pix_mp->quantization = ctx->state.quantization;
- memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved));
- memset(pix_mp->plane_fmt[0].reserved, 0,
- sizeof(pix_mp->plane_fmt[0].reserved));
break;
default:
return -EINVAL;
@@ -886,8 +883,6 @@ static int vidioc_try_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f)
info->sizeimage_mult / info->sizeimage_div;
if (pix_mp->pixelformat == V4L2_PIX_FMT_FWHT)
plane->sizeimage += sizeof(struct fwht_cframe_hdr);
- memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved));
- memset(plane->reserved, 0, sizeof(plane->reserved));
break;
default:
return -EINVAL;