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

Jamie Iles jamie at jamieiles.com
Mon Aug 1 08:31:03 EDT 2011


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

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;
 }
 
-- 
1.7.4.1




More information about the linux-arm-kernel mailing list