summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_efikamx.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2010-12-13 10:47:05 -0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-12-14 09:55:53 +0100
commit28a4f908acb342350b9ecbfcdf0a999cb83e05aa (patch)
treece0bea69a22fe4731a094a443d6ea2660a27c82b /arch/arm/mach-mx5/board-mx51_efikamx.c
parentbb477de2efc560e55c4a830329273661f3664bc8 (diff)
downloadblackbird-op-linux-28a4f908acb342350b9ecbfcdf0a999cb83e05aa.tar.gz
blackbird-op-linux-28a4f908acb342350b9ecbfcdf0a999cb83e05aa.zip
ARM: mx5: check for error in ioremap
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_efikamx.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_efikamx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index 5ab21a0036c1..94e7818c5060 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -148,6 +148,8 @@ static int initialize_otg_port(struct platform_device *pdev)
void __iomem *usb_base;
void __iomem *usbother_base;
usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K);
+ if (!usb_base)
+ return -ENOMEM;
usbother_base = (void __iomem *)(usb_base + MX5_USBOTHER_REGS_OFFSET);
/* Set the PHY clock to 19.2MHz */
OpenPOWER on IntegriCloud