Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e42b78c authored by Patrick Daly's avatar Patrick Daly
Browse files

iommu: dma-iommu: Handle error case properly



If there is not enough available iova space, do not apply the
workaround to map guard pages to meet hw alignment requirement.

Change-Id: I07ed8389c61602603d002cbd1381c79770a4928b
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent f6347714
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -451,7 +451,7 @@ static dma_addr_t iommu_dma_alloc_iova(struct iommu_domain *domain,

	ret_iova = (dma_addr_t)iova << shift;

	if (guard_len &&
	if (ret_iova && guard_len &&
		iommu_map(domain, ret_iova + size,
			page_to_phys(cookie->guard_page),
			guard_len, ARM_SMMU_GUARD_PROT)) {