Skip to content

Commit

Permalink
AMD IOMMU: __unmap_single: check for bad_dma_address instead of 0
Browse files Browse the repository at this point in the history
Impact: minor fix

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Joerg Roedel committed Dec 8, 2008
1 parent 8ad909c commit b8d9905
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b8d9905

Please sign in to comment.