• Jingju Hou's avatar
    mmc: sdhci-pxav3: fix platform_data is not initialized · 9cd76049
    Jingju Hou authored
    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: default avatarJingju Hou <houjingj@marvell.com>
    Fixes: b650352d("mmc: sdhci-pxa: Add device tree support")
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    9cd76049
sdhci-pxav3.c 14.9 KB