[PATCH] ASoC: tegra: Fix potential NULL dereference on AHUB removal

From: Guangshuo Li

Date: Tue Nov 10 2026 - 10:59:10 EST


I2S child removal releases its FIFOs and routes through the AHUB.
Leaving the children registered while removing the AHUB clears their
shared context before those cleanup operations can run.

Depopulate the children before disabling runtime PM and clearing ahub.

This issue was found by our static analysis tool under development.

Fixes: be944d42ccc1 ("ASoC: tegra: add tegra30-ahub driver")
Signed-off-by: Guangshuo Li <liguangshuo@xxxxxxxxxxxxxxx>
---
sound/soc/tegra/tegra30_ahub.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index ee68f28852c4..fe04d19dd6c7 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -595,6 +595,7 @@ static int tegra30_ahub_probe(struct platform_device *pdev)

static void tegra30_ahub_remove(struct platform_device *pdev)
{
+ of_platform_depopulate(&pdev->dev);
pm_runtime_disable(&pdev->dev);

ahub = NULL;

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.43.0