mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
mmc: sdhci-msm: Add NULL check before dereferencing var_info
Add NULL check before dereferencing var_info. Change-Id: I8f3acd69118bedd0b156cb8764d3d172ac4576cc Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
This commit is contained in:
parent
e0f5b51058
commit
fceb94ab29
1 changed files with 5 additions and 0 deletions
|
|
@ -4145,6 +4145,11 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||
*/
|
||||
var_info = of_device_get_match_data(&pdev->dev);
|
||||
|
||||
if (!var_info) {
|
||||
dev_err(&pdev->dev, "Compatible string not found\n");
|
||||
goto pltfm_free;
|
||||
}
|
||||
|
||||
msm_host->mci_removed = var_info->mci_removed;
|
||||
msm_host->restore_dll_config = var_info->restore_dll_config;
|
||||
msm_host->var_ops = var_info->var_ops;
|
||||
|
|
|
|||
Loading…
Reference in a new issue