aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/dma-mapping.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-06-10 14:34:40 -0400
committerMarek Szyprowski <m.szyprowski@samsung.com>2013-06-28 09:14:27 -0400
commit9e4b259d4fbf8a9c822117e734356e94b7f30927 (patch)
treeab378986ba020efa32e1cb709085be44b06eda3c /arch/arm/mm/dma-mapping.c
parent13987d68bcf476a93fa864ea4e58755f1bc4bd30 (diff)
ARM: dma-mapping: NULLify dev->archdata.mapping pointer on detach
The current code only clobbers a local variable, so the device is left with a stale mapping pointer. Cc: Hiroshi Doyu <hdoyu@nvidia.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Acked-by: Hiroshi Doyu <hdoyu@nvidia.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'arch/arm/mm/dma-mapping.c')
-rw-r--r--arch/arm/mm/dma-mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 282aacd6f570..26a5833c9f29 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1922,7 +1922,7 @@ void arm_iommu_detach_device(struct device *dev)
1922 1922
1923 iommu_detach_device(mapping->domain, dev); 1923 iommu_detach_device(mapping->domain, dev);
1924 kref_put(&mapping->kref, release_iommu_mapping); 1924 kref_put(&mapping->kref, release_iommu_mapping);
1925 mapping = NULL; 1925 dev->archdata.mapping = NULL;
1926 set_dma_ops(dev, NULL); 1926 set_dma_ops(dev, NULL);
1927 1927
1928 pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); 1928 pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev));