summaryrefslogtreecommitdiff
path: root/drivers/iommu/tegra-gart.c
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2018-04-09 23:07:20 +0300
committerJoerg Roedel <jroedel@suse.de>2018-05-03 17:30:28 +0300
commit130a2fdf0b9e2305fd4dfbf7e6fb58c31df0fe8e (patch)
tree742c4f6827eaf65253d97ec01cf469b0caa43391 /drivers/iommu/tegra-gart.c
parent40c9b882fa74771544b0e41209e99d78685f94be (diff)
downloadlinux-130a2fdf0b9e2305fd4dfbf7e6fb58c31df0fe8e.tar.xz
iommu/tegra: gart: Fix gart_iommu_unmap()
It must return the number of unmapped bytes on success, returning 0 means that unmapping failed and in result only one page is unmapped. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/tegra-gart.c')
-rw-r--r--drivers/iommu/tegra-gart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index 4c0abdcd1ad2..89ec24c6952c 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -313,7 +313,7 @@ static size_t gart_iommu_unmap(struct iommu_domain *domain, unsigned long iova,
gart_set_pte(gart, iova, 0);
FLUSH_GART_REGS(gart);
spin_unlock_irqrestore(&gart->pte_lock, flags);
- return 0;
+ return bytes;
}
static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain,