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

Commit b8d9905d authored by Joerg Roedel's avatar Joerg Roedel
Browse files

AMD IOMMU: __unmap_single: check for bad_dma_address instead of 0



Impact: minor fix

Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 8ad909c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -983,7 +983,8 @@ static void __unmap_single(struct amd_iommu *iommu,
	dma_addr_t i, start;
	unsigned int pages;

	if ((dma_addr == 0) || (dma_addr + size > dma_dom->aperture_size))
	if ((dma_addr == bad_dma_address) ||
	    (dma_addr + size > dma_dom->aperture_size))
		return;

	pages = iommu_num_pages(dma_addr, size, PAGE_SIZE);