[PATCH 1/2] mci omap: do not fail on nonexistent pdata
Sascha Hauer
s.hauer at pengutronix.de
Thu Oct 13 11:18:43 EDT 2011
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mci/omap_hsmmc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index 3f70e22..d171c1d 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -569,7 +569,7 @@ static int omap_mmc_probe(struct device_d *dev)
hsmmc->mci.f_min = 400000;
pdata = (struct omap_hsmmc_platform_data *)dev->platform_data;
- if (pdata->f_max)
+ if (pdata && pdata->f_max)
hsmmc->mci.f_max = pdata->f_max;
else
hsmmc->mci.f_max = 52000000;
--
1.7.7
More information about the barebox
mailing list