Skip to content

Commit

Permalink
ASoC: playpaq_wm8510: Return proper error if clk_get fails
Browse files Browse the repository at this point in the history
Return proper error instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Sep 9, 2011
1 parent 283e42e commit 6947414
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/atmel/playpaq_wm8510.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,17 @@ static int __init playpaq_asoc_init(void)
_gclk0 = clk_get(NULL, "gclk0");
if (IS_ERR(_gclk0)) {
_gclk0 = NULL;
ret = PTR_ERR(_gclk0);
goto err_gclk0;
}
_pll0 = clk_get(NULL, "pll0");
if (IS_ERR(_pll0)) {
_pll0 = NULL;
ret = PTR_ERR(_pll0);
goto err_pll0;
}
if (clk_set_parent(_gclk0, _pll0)) {
ret = clk_set_parent(_gclk0, _pll0);
if (ret) {
pr_warning("snd-soc-playpaq: "
"Failed to set PLL0 as parent for DAC clock\n");
goto err_set_clk;
Expand Down

0 comments on commit 6947414

Please sign in to comment.