kernel: mips: fix an off-by-one in dma_capable

This commit is contained in:
hanwckf
2022-02-12 00:33:25 +08:00
parent 8bd1c4d210
commit ccff63450a

View File

@ -72,7 +72,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) {}