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

ASoC: mediatek: mt8173: fix device_node leak

Fixes the device_node leak.
Signed-off-by: NTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20211224064719.2031210-2-tzungbi@google.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 2f15d3ce
...@@ -180,6 +180,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev) ...@@ -180,6 +180,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev)
if (ret) if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret); __func__, ret);
of_node_put(codec_node);
of_node_put(platform_node);
return ret; return ret;
} }
......
...@@ -218,6 +218,8 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev) ...@@ -218,6 +218,8 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev)
if (ret) if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret); __func__, ret);
of_node_put(platform_node);
return ret; return ret;
} }
......
...@@ -285,6 +285,8 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev) ...@@ -285,6 +285,8 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev)
if (ret) if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret); __func__, ret);
of_node_put(platform_node);
return ret; return ret;
} }
......
...@@ -323,6 +323,8 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) ...@@ -323,6 +323,8 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev)
if (ret) if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret); __func__, ret);
of_node_put(platform_node);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册