]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/powerpc/include/asm/dma-mapping.h
dma-mapping: fix off-by-one error in dma_capable()
[net-next-2.6.git] / arch / powerpc / include / asm / dma-mapping.h
index e281daebddca317e10c1263c3d7cccf93dcb5538..80a973bb9e71397a7f65497d034d9eb7f7958a62 100644 (file)
@@ -197,7 +197,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
        if (!dev->dma_mask)
                return 0;
 
-       return addr + size <= *dev->dma_mask;
+       return addr + size - 1 <= *dev->dma_mask;
 }
 
 static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)