dmaengine: fsl-edma: use struct_size() helper
authorYu Liao <liaoyu15@huawei.com>
Mon, 21 Aug 2023 07:36:00 +0000 (15:36 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 21 Aug 2023 13:05:23 +0000 (18:35 +0530)
commit33a0b734543ed5a44135e15f00429b94f75f2866
tree83c337f84be5f2a67f251878088e4a6211b03b7d
parent923b138388928ade722cba86c55145f3dfac1cab
dmaengine: fsl-edma: use struct_size() helper

Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worst scenario, could lead to heap overflows.

Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Link: https://lore.kernel.org/r/20230821073600.4078584-1-liaoyu15@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/fsl-edma.c