Skip to content

Commit 04cb269

Browse files
AnnYugawabroonie
authored andcommitted
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>
1 parent 85f8c2d commit 04cb269

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/soc/tegra/tegra210_ahub.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,8 @@ static int tegra_ahub_probe(struct platform_device *pdev)
13591359
return -ENOMEM;
13601360

13611361
ahub->soc_data = of_device_get_match_data(&pdev->dev);
1362+
if (!ahub->soc_data)
1363+
return -ENODEV;
13621364

13631365
platform_set_drvdata(pdev, ahub);
13641366

0 commit comments

Comments
 (0)