media: imx-jpeg: Remove unnecessary memset() after dma_alloc_coherent()
authorJason Wang <wangborong@cdjrlc.com>
Sat, 16 Jul 2022 12:25:43 +0000 (20:25 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 30 Sep 2022 13:44:09 +0000 (15:44 +0200)
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c

index 32fd04a3d8bb7f2e3fe024a73afdca43604b5789..482177ee01b6fc19d7e1ce4b79aa48dfe40e5f58 100644 (file)
@@ -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: