Message ID | 1312201870-12921-7-git-send-email-jamie@jamieiles.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c index ea50fe2..4f8d68c 100644 --- a/arch/arm/mach-tegra/io.c +++ b/arch/arm/mach-tegra/io.c @@ -67,6 +67,10 @@ void __init tegra_map_common_io(void) void __iomem *tegra_ioremap(unsigned long p, size_t size, unsigned int type) { void __iomem *v = IO_ADDRESS(p); + + if (!size) + return NULL; + if (v == NULL) v = __arm_ioremap(p, size, type); return v;
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: Colin Cross <ccross@android.com> Cc: Erik Gilling <konkers@android.com> Cc: Olof Johansson <olof@lixom.net> Signed-off-by: Jamie Iles <jamie@jamieiles.com> --- arch/arm/mach-tegra/io.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)