iommu/dart: Use kmemdup instead of kzalloc and memcpy
authorWan Jiabing <wanjiabing@vivo.com>
Wed, 13 Oct 2021 06:34:41 +0000 (02:34 -0400)
committerJoerg Roedel <jroedel@suse.de>
Mon, 18 Oct 2021 11:35:24 +0000 (13:35 +0200)
commit260aecd643fc129c1771cefdd2aaaedf0485fa59
treec0feabc5a34a56e73783ea3c737062891b8092e1
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896
iommu/dart: Use kmemdup instead of kzalloc and memcpy

Fix following coccicheck warning:
drivers/iommu/apple-dart.c:704:20-27: WARNING opportunity for kmemdup

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Acked-by: Sven Peter <sven@svenpeter.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Link: https://lore.kernel.org/r/20211013063441.29888-1-wanjiabing@vivo.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/apple-dart.c