summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@google.com>2021-12-14 12:00:28 +0800
committerMark Brown <broonie@kernel.org>2021-12-23 17:36:44 +0000
commit4e28491a7a198c668437f2be8a91a76aa52f20eb (patch)
treeef6787ccb964bfff9aee33d40febd5a89c2f3865 /sound
parent8102d8cd8f26117a7d74142878b4efe7fdeda6cf (diff)
downloadlinux-4e28491a7a198c668437f2be8a91a76aa52f20eb.tar.bz2
ASoC: mediatek: mt8192-mt6359: fix device_node leak
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index 1d16939f80e3..2552f30d8fe4 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -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