Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[pandora-kernel.git] / arch / powerpc / mm / pgtable_64.c
index 2ffca63..7b278d8 100644 (file)
@@ -174,7 +174,7 @@ void __iomem * __ioremap(unsigned long addr, unsigned long size,
        pa = addr & PAGE_MASK;
        size = PAGE_ALIGN(addr + size) - pa;
 
-       if (size == 0)
+       if ((size == 0) || (pa == 0))
                return NULL;
 
        if (mem_init_done) {