[PATCH 9/9] omap: make __arch_ioremap() with 0 size return NULL
Jamie Iles
jamie at jamieiles.com
Mon Aug 1 08:31:10 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: Tony Lindgren <tony at atomide.com>
Signed-off-by: Jamie Iles <jamie at jamieiles.com>
---
arch/arm/plat-omap/io.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index f1ecfa9..e7bc77f 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -28,6 +28,9 @@
*/
void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
{
+ if (!size)
+ return NULL;
+
#ifdef CONFIG_ARCH_OMAP1
if (cpu_class_is_omap1()) {
if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
--
1.7.4.1
More information about the linux-arm-kernel
mailing list