diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index 166aee13c4b1bd40e963e6b14132796d04aec757..1f9f94f9af4bac8d99137cad55204afcc279c0e4 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c @@ -485,7 +485,7 @@ void consistent_sync(const void *start, size_t size, int direction) { const void *end = start + size; - BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end)); + BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end - 1)); switch (direction) { case DMA_FROM_DEVICE: /* invalidate only */