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

Commit 1aaf200b authored by Meng Wang's avatar Meng Wang
Browse files

ASoC: msm8996: check null pointer of match



The return value of of_match_node could be null. Make change
to check if the return value is null.

Change-Id: I2db63a867d51059011df59819dc61ade3339818d
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent 629429d5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3539,6 +3539,12 @@ static int msm8996_asoc_machine_probe(struct platform_device *pdev)

	match = of_match_node(msm8996_asoc_machine_of_match,
			pdev->dev.of_node);
	if (!match) {
		dev_err(&pdev->dev, "%s: no matched codec is found.\n",
			__func__);
		goto err;
	}

	if (!strcmp(match->data, "tomtom_codec"))
		mclk_freq_prop_name = "qcom,tomtom-mclk-clk-freq";
	else