mips: fix an off-by-one in dma_capable
This makes it match the generic version. Reported-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
298f0027d5
commit
10dac04c79
|
@ -22,7 +22,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
|
|||
if (!dev->dma_mask)
|
||||
return false;
|
||||
|
||||
return addr + size <= *dev->dma_mask;
|
||||
return addr + size - 1 <= *dev->dma_mask;
|
||||
}
|
||||
|
||||
static inline void dma_mark_clean(void *addr, size_t size) {}
|
||||
|
|
Loading…
Reference in New Issue