]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 08:57:57 +0000 (10:57 +0200)
[ Upstream commit 2bcc3b48c8ddf2d83cf00a00c0d021970c271fff ]

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>
Stable-dep-of: 46e9c092f850 ("media: imx-jpeg: Move mxc_jpeg_free_slot_data() ahead")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c

index 7d6dd7a4833ce6e6e0ce0b12b426766ad7ed6271..c3655ab4511b404a82738de4410d3553543be0ee 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: