Skip to content

Commit

Permalink
ASoC: mediatek: mt8192-mt6359: fix device_node leak
Browse files Browse the repository at this point in the history
The of_parse_phandle() document:
    >>> Use of_node_put() on it when done.

The driver didn't call of_node_put().  Fixes the leak.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20211214040028.2992627-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Tzung-Bi Shih authored and Mark Brown committed Dec 23, 2021
1 parent 8102d8c commit 4e28491
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,11 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev)
return ret;
}

return devm_snd_soc_register_card(&pdev->dev, card);
ret = devm_snd_soc_register_card(&pdev->dev, card);

of_node_put(platform_node);
of_node_put(hdmi_codec);
return ret;
}

#ifdef CONFIG_OF
Expand Down

0 comments on commit 4e28491

Please sign in to comment.