]> git.baikalelectronics.ru Git - kernel.git/commit
drm/rockchip: don't leak iommu mapping
authorJohn Keeping <john@metanate.com>
Tue, 5 Apr 2016 13:50:32 +0000 (14:50 +0100)
committerMark Yao <mark.yao@rock-chips.com>
Tue, 3 May 2016 06:11:22 +0000 (14:11 +0800)
commit095645b86f3881fd4c25fcf1c76199e0594014a9
tree00bcee6f4c3a1737b9b4f45fef42344b40f41a62
parentc90f73bd0902ee353d8e9c50e0656a9f3720843a
drm/rockchip: don't leak iommu mapping

arm_iommu_attach_device() takes its own reference to the mapping we give
it.  Since we do not keep a reference to the mapping ourselves, we must
release it before returning.

Also fix the error path, which fails to release the mapping if it has
called arm_iommu_detach_device() since that clears archdata.mapping.

Signed-off-by: John Keeping <john@metanate.com>
drivers/gpu/drm/rockchip/rockchip_drm_drv.c