Commit 69474147 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: playpaq_wm8510: Return proper error if clk_get fails

Return proper error instead of 0 if clk_get fails.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 283e42e0
...@@ -383,14 +383,17 @@ static int __init playpaq_asoc_init(void) ...@@ -383,14 +383,17 @@ static int __init playpaq_asoc_init(void)
_gclk0 = clk_get(NULL, "gclk0"); _gclk0 = clk_get(NULL, "gclk0");
if (IS_ERR(_gclk0)) { if (IS_ERR(_gclk0)) {
_gclk0 = NULL; _gclk0 = NULL;
ret = PTR_ERR(_gclk0);
goto err_gclk0; goto err_gclk0;
} }
_pll0 = clk_get(NULL, "pll0"); _pll0 = clk_get(NULL, "pll0");
if (IS_ERR(_pll0)) { if (IS_ERR(_pll0)) {
_pll0 = NULL; _pll0 = NULL;
ret = PTR_ERR(_pll0);
goto err_pll0; goto err_pll0;
} }
if (clk_set_parent(_gclk0, _pll0)) { ret = clk_set_parent(_gclk0, _pll0);
if (ret) {
pr_warning("snd-soc-playpaq: " pr_warning("snd-soc-playpaq: "
"Failed to set PLL0 as parent for DAC clock\n"); "Failed to set PLL0 as parent for DAC clock\n");
goto err_set_clk; goto err_set_clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment