summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJingju Hou <houjingj@marvell.com>2015-07-23 17:56:23 +0800
committerLuis Henriques <luis.henriques@canonical.com>2015-08-12 09:48:33 +0100
commit858f7ef525ccef5103873d41b778dd3027986028 (patch)
tree6d432a127e7dac97387b69a4370d985e5f11c89a /drivers/mmc
parenta2f985afa64c487fb9c85184e26006fbcc885c51 (diff)
downloadlinux-stable-858f7ef525ccef5103873d41b778dd3027986028.tar.gz
linux-stable-858f7ef525ccef5103873d41b778dd3027986028.tar.bz2
linux-stable-858f7ef525ccef5103873d41b778dd3027986028.zip
mmc: sdhci-pxav3: fix platform_data is not initialized
commit 9cd76049f0d90ae241f5ad80e311489824527000 upstream. pdev->dev.platform_data is not initialized if match is true in function sdhci_pxav3_probe. Just local variable pdata is assigned the return value from function pxav3_get_mmc_pdata(). static int sdhci_pxav3_probe(struct platform_device *pdev) { struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data; ... if (match) { ret = mmc_of_parse(host->mmc); if (ret) goto err_of_parse; sdhci_get_of_property(pdev); pdata = pxav3_get_mmc_pdata(dev); } ... } Signed-off-by: Jingju Hou <houjingj@marvell.com> Fixes: b650352dd3df("mmc: sdhci-pxa: Add device tree support") Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-pxav3.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 3ceadd11f641..e630970c4f31 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -360,6 +360,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
goto err_of_parse;
sdhci_get_of_property(pdev);
pdata = pxav3_get_mmc_pdata(dev);
+ pdev->dev.platform_data = pdata;
} else if (pdata) {
/* on-chip device */
if (pdata->flags & PXA_FLAG_CARD_PERMANENT)