diff options
author | Yuanjun Gong <ruc_gongyuanjun@163.com> | 2025-05-13 20:37:44 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-27 11:11:27 +0100 |
commit | bf6a433b884fec7808b97b0edf85143308af85fa (patch) | |
tree | 5a1ca55918c7f641d918be5f7a728203793256da | |
parent | f34e0c15561d8c5aeadb62e926adf1ccde4d9f79 (diff) |
ASoC: tegra210_ahub: Add check to of_device_get_match_data()
[ Upstream commit 04cb269c204398763a620d426cbee43064854000 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | sound/soc/tegra/tegra210_ahub.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c index 1920b996e9aad..51043e556b3e9 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); |