Merge branch 'next' into for-linus
[firefly-linux-kernel-4.4.55.git] / arch / arm / mm / ioremap.c
index ba159370fa5f710633d6b00a078c23bc40ad6f6a..80632e8d7538f33d5a6539df5a72a90fff52e7ec 100644 (file)
@@ -225,8 +225,7 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
                if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype))
                        continue;
                if (__phys_to_pfn(area->phys_addr) > pfn ||
-                   __pfn_to_phys(pfn) + offset + size-1 >
-                   area->phys_addr + area->size-1)
+                   __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1)
                        continue;
                /* we can drop the lock here as we know *area is static */
                read_unlock(&vmlist_lock);