summaryrefslogtreecommitdiff
path: root/arch/riscv/mm/ioremap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/mm/ioremap.c')
-rw-r--r--arch/riscv/mm/ioremap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/mm/ioremap.c b/arch/riscv/mm/ioremap.c
index 70ef2724cdf6..bd2f2db557cc 100644
--- a/arch/riscv/mm/ioremap.c
+++ b/arch/riscv/mm/ioremap.c
@@ -42,7 +42,7 @@ static void __iomem *__ioremap_caller(phys_addr_t addr, size_t size,
/* Page-align mappings */
offset = addr & (~PAGE_MASK);
- addr &= PAGE_MASK;
+ addr -= offset;
size = PAGE_ALIGN(size + offset);
area = get_vm_area_caller(size, VM_IOREMAP, caller);