summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuanjun Gong <ruc_gongyuanjun@163.com>2025-05-13 20:37:44 +0800
committerMark Brown <broonie@kernel.org>2025-05-14 09:47:36 +0200
commit04cb269c204398763a620d426cbee43064854000 (patch)
tree70abc7297d2b5fd5bcb5c450e08ad46a52e13ebc
parent85f8c2d56caf56aa3379bbc5f1a19fef9aabd23e (diff)
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: Yuanjun Gong <ruc_gongyuanjun@163.com> Link: https://patch.msgid.link/20250513123744.3041724-1-ruc_gongyuanjun@163.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/tegra/tegra210_ahub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index 99683f292b5d..ae4965a9f764 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -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);