[2/9] ebsa110: make __arch_ioremap() with 0 size return NULL
diff mbox

Message ID 1312201870-12921-2-git-send-email-jamie@jamieiles.com
State New, archived
Headers show

Commit Message

Jamie Iles Aug. 1, 2011, 12:31 p.m. UTC
Without __arch_ioremap(), __get_vm_area_node() with a zero size will
return a NULL pointer.  Make the arch specific ioremap() do the same
thing.

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/arm/mach-ebsa110/include/mach/io.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch
diff mbox

diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h
index f68daa63..d8dc6ee 100644
--- a/arch/arm/mach-ebsa110/include/mach/io.h
+++ b/arch/arm/mach-ebsa110/include/mach/io.h
@@ -67,6 +67,9 @@  void __writel(u32 val, void __iomem *addr);
 static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
 					   unsigned int flags)
 {
+	if (!size)
+		return NULL;
+
 	return (void __iomem *)cookie;
 }