Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fceb94ab authored by Sarthak Garg's avatar Sarthak Garg
Browse files

mmc: sdhci-msm: Add NULL check before dereferencing var_info



Add NULL check before dereferencing var_info.

Change-Id: I8f3acd69118bedd0b156cb8764d3d172ac4576cc
Signed-off-by: default avatarSarthak Garg <sartgarg@codeaurora.org>
parent e0f5b510
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;