mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
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: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
a7d0942979
commit
af64d7341a
@ -495,6 +495,7 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
|
|||||||
priv->extclk = devm_clk_get(&pdev->dev, "extclk");
|
priv->extclk = devm_clk_get(&pdev->dev, "extclk");
|
||||||
if (!IS_ERR(priv->extclk)) {
|
if (!IS_ERR(priv->extclk)) {
|
||||||
if (priv->extclk == priv->clk) {
|
if (priv->extclk == priv->clk) {
|
||||||
|
devm_clk_put(&pdev->dev, priv->extclk);
|
||||||
priv->extclk = ERR_PTR(-EINVAL);
|
priv->extclk = ERR_PTR(-EINVAL);
|
||||||
} else {
|
} else {
|
||||||
dev_info(&pdev->dev, "found external clock\n");
|
dev_info(&pdev->dev, "found external clock\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user