summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap4panda.c
diff options
context:
space:
mode:
authorDavid Anders <x0132446@ti.com>2010-10-07 19:36:29 +0000
committerTony Lindgren <tony@atomide.com>2010-10-08 11:06:34 -0700
commitb9b52620823f84f95f3fd94dd6769b7102d7888a (patch)
tree6779d792f3e7195ee66dc31f94bf67dce50c721c /arch/arm/mach-omap2/board-omap4panda.c
parent191183b94cc511d0fc2326c83165d95aeabacac4 (diff)
omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
Avoid possible crash if CONFIG_MMC_OMAP_HS is not set. Signed-off-by: David Anders <x0132446@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index d8c70c13953..e9c6b24361b 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -116,7 +116,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
{
- struct omap_mmc_platform_data *pdata = dev->platform_data;
+ struct omap_mmc_platform_data *pdata;
+
+ /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
+ if (!dev) {
+ pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n");
+ return;
+ }
+ pdata = dev->platform_data;
pdata->init = omap4_twl6030_hsmmc_late_init;
}