提交 af64d734 编写于 作者: R Russell King 提交者: Mark Brown

ASoC: kirkwood: Free external clock if it is a duplicate of internal

[Remaining patch from "ASoC: kirkwood: use devm_clk_get() for the
external clock" -- broonie]
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 a7d09429
......@@ -495,6 +495,7 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
priv->extclk = devm_clk_get(&pdev->dev, "extclk");
if (!IS_ERR(priv->extclk)) {
if (priv->extclk == priv->clk) {
devm_clk_put(&pdev->dev, priv->extclk);
priv->extclk = ERR_PTR(-EINVAL);
} else {
dev_info(&pdev->dev, "found external clock\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册