aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Zekun <zhangzekun11@huawei.com>2022-06-17 10:39:25 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-06-27 09:13:03 +0100
commit3e52be9bc501e577e2d8429bc2337bd979d38887 (patch)
treee90a4142f3d2723ef08f80a6615f1407f6390632
parentmedia: atmel: atmel-isc-base: allow wb ctrls to be changed when isc is not configured (diff)
downloadlinux-dev-3e52be9bc501e577e2d8429bc2337bd979d38887.tar.xz
linux-dev-3e52be9bc501e577e2d8429bc2337bd979d38887.zip
media: rkvdec:Remove redundant memset
As dma_alloc_coherent() will return a zeroed buffer, we don't need to memset the returned buffer. priv_tbl = dma_alloc_coherent() and count_tbl = dma_alloc_coherent() should be enough. -see commit 750afb08ca71 ("cross-tree: phase out dma_zalloc_coherent()") Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r--drivers/staging/media/rkvdec/rkvdec-vp9.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/media/rkvdec/rkvdec-vp9.c b/drivers/staging/media/rkvdec/rkvdec-vp9.c
index 311a12656072..c2f42e76be10 100644
--- a/drivers/staging/media/rkvdec/rkvdec-vp9.c
+++ b/drivers/staging/media/rkvdec/rkvdec-vp9.c
@@ -1015,7 +1015,6 @@ static int rkvdec_vp9_start(struct rkvdec_ctx *ctx)
vp9_ctx->priv_tbl.size = sizeof(*priv_tbl);
vp9_ctx->priv_tbl.cpu = priv_tbl;
- memset(priv_tbl, 0, sizeof(*priv_tbl));
count_tbl = dma_alloc_coherent(rkvdec->dev, RKVDEC_VP9_COUNT_SIZE,
&vp9_ctx->count_tbl.dma, GFP_KERNEL);
@@ -1026,7 +1025,6 @@ static int rkvdec_vp9_start(struct rkvdec_ctx *ctx)
vp9_ctx->count_tbl.size = RKVDEC_VP9_COUNT_SIZE;
vp9_ctx->count_tbl.cpu = count_tbl;
- memset(count_tbl, 0, sizeof(*count_tbl));
rkvdec_init_v4l2_vp9_count_tbl(ctx);
return 0;