diff mbox

[8/9] iop: make __arch_ioremap() with 0 size return NULL

Message ID 1312201870-12921-8-git-send-email-jamie@jamieiles.com (mailing list archive)
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: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/arm/plat-iop/io.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/plat-iop/io.c b/arch/arm/plat-iop/io.c
index e15bc17..9800b15 100644
--- a/arch/arm/plat-iop/io.c
+++ b/arch/arm/plat-iop/io.c
@@ -26,6 +26,9 @@  void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size,
 {
 	void __iomem * retval;
 
+	if (!size)
+		return NULL;
+
 	switch (cookie) {
 	case IOP3XX_PCI_LOWER_IO_PA ... IOP3XX_PCI_UPPER_IO_PA:
 		retval = (void *) IOP3XX_PCI_IO_PHYS_TO_VIRT(cookie);