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:
Родитель
a7d0942979
Коммит
af64d7341a
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче