Unverified Commit 04cb269c authored by Yuanjun Gong's avatar Yuanjun Gong Committed by Mark Brown
Browse files

ASoC: tegra210_ahub: Add check to of_device_get_match_data()



In tegra_ahub_probe(), check the result of function
of_device_get_match_data(), return an error code in case it fails.

Signed-off-by: default avatarYuanjun Gong <ruc_gongyuanjun@163.com>
Link: https://patch.msgid.link/20250513123744.3041724-1-ruc_gongyuanjun@163.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 85f8c2d5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1359,6 +1359,8 @@ static int tegra_ahub_probe(struct platform_device *pdev)
		return -ENOMEM;

	ahub->soc_data = of_device_get_match_data(&pdev->dev);
	if (!ahub->soc_data)
		return -ENODEV;

	platform_set_drvdata(pdev, ahub);