From: Russell King Date: Sun, 4 Aug 2013 19:23:03 +0000 (+0100) Subject: ASoC: kirkwood: Free external clock if it is a duplicate of internal X-Git-Tag: next-20130822~64^2~40^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=af64d7341ab51335eeb03453180cf200b120ec43;p=karo-tx-linux.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index ba7203995369..0109b1e8449a 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -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");