diff mbox series

media: imx-jpeg: Remove unnecessary memset() after dma_alloc_coherent()

Message ID 20220716122543.34218-1-wangborong@cdjrlc.com
State Accepted
Commit 2bcc3b48c8ddf2d83cf00a00c0d021970c271fff
Headers show
Series media: imx-jpeg: Remove unnecessary memset() after dma_alloc_coherent() | expand

Commit Message

Jason Wang July 16, 2022, 12:25 p.m. UTC
The `dma_alloc_coherent()' already zeroes out memory for us, so we don't
need the redundant memset().

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
index 32fd04a3d8bb..482177ee01b6 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
@@ -519,7 +519,6 @@  static bool mxc_jpeg_alloc_slot_data(struct mxc_jpeg_dev *jpeg,
 				     GFP_ATOMIC);
 	if (!cfg_stm)
 		goto err;
-	memset(cfg_stm, 0, MXC_JPEG_MAX_CFG_STREAM);
 	jpeg->slot_data[slot].cfg_stream_vaddr = cfg_stm;
 
 skip_alloc: