mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
ASoC: mediatek: mt8173: fix device_node leak
[ Upstream commit 493433785d
]
Fixes the device_node leak.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20211224064719.2031210-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a38b8e81bb
commit
00d65478a0
4 changed files with 9 additions and 0 deletions
|
@ -177,6 +177,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
|
||||
__func__, ret);
|
||||
|
||||
of_node_put(codec_node);
|
||||
of_node_put(platform_node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -227,6 +227,8 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
|
||||
__func__, ret);
|
||||
|
||||
of_node_put(platform_node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -284,6 +284,8 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
|
||||
__func__, ret);
|
||||
|
||||
of_node_put(platform_node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -316,6 +316,8 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
|
||||
__func__, ret);
|
||||
|
||||
of_node_put(platform_node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue