未验证 提交 4e28491a 编写于 作者: T Tzung-Bi Shih 提交者: Mark Brown

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: NTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20211214040028.2992627-1-tzungbi@google.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 8102d8cd
...@@ -1172,7 +1172,11 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev) ...@@ -1172,7 +1172,11 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev)
return ret; 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 #ifdef CONFIG_OF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册