diff options
author | David Anders <x0132446@ti.com> | 2010-10-07 19:36:29 +0000 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-10-08 11:06:34 -0700 |
commit | b9b52620823f84f95f3fd94dd6769b7102d7888a (patch) | |
tree | 6779d792f3e7195ee66dc31f94bf67dce50c721c /arch/arm/mach-omap2 | |
parent | 191183b94cc511d0fc2326c83165d95aeabacac4 (diff) | |
download | talos-op-linux-b9b52620823f84f95f3fd94dd6769b7102d7888a.tar.gz talos-op-linux-b9b52620823f84f95f3fd94dd6769b7102d7888a.zip |
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')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 9 |
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 d8c70c13953a..e9c6b24361bc 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; } |