From: Joerg Roedel Date: Mon, 8 Dec 2008 13:40:26 +0000 (+0100) Subject: AMD IOMMU: __unmap_single: check for bad_dma_address instead of 0 X-Git-Tag: v2.6.28-rc8~42^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b8d9905d025d80a2357e8ce4704fde2923f6a1bd;p=linux-2.6-omap-h63xx.git AMD IOMMU: __unmap_single: check for bad_dma_address instead of 0 Impact: minor fix Signed-off-by: Joerg Roedel --- diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 3133a0ea09f..a7b6dec6fc3 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -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);