iommu/sprd: Release dma buffer to avoid memory leak
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Fri, 31 Mar 2023 03:31:23 +0000 (11:31 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 31 Mar 2023 08:12:51 +0000 (10:12 +0200)
commit9afea57384d4ae7b2034593eac7fa76c7122762a
tree5bd711826f720f3086f673599e47c7b690767d74
parente8d018dd0257f744ca50a729e3d042cf2ec9da65
iommu/sprd: Release dma buffer to avoid memory leak

When attaching to a domain, the driver would alloc a DMA buffer which
is used to store address mapping table, and it need to be released
when the IOMMU domain is freed.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lore.kernel.org/r/20230331033124.864691-2-zhang.lyra@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/sprd-iommu.c