diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-06 18:15:19 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-06 21:46:19 +0100 |
commit | 171ec6b0897422099438a9c66546380d0fa2ff44 (patch) | |
tree | affa8365cd316153abcd387ccd6f264842079170 /sound/soc/soc-dapm.c | |
parent | 4113e443161f4fd3b33e8015a1edc190e2296790 (diff) | |
download | linux-171ec6b0897422099438a9c66546380d0fa2ff44.tar.gz linux-171ec6b0897422099438a9c66546380d0fa2ff44.tar.bz2 linux-171ec6b0897422099438a9c66546380d0fa2ff44.zip |
ASoC: Simplify logic in snd_soc_dapm_set_bias_level()
No functional changes but much less indentation.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 4452b571c1b8..d989dd71e3ac 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -143,17 +143,19 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, if (card && card->set_bias_level) ret = card->set_bias_level(card, level); - if (ret == 0) { - if (dapm->codec && dapm->codec->driver->set_bias_level) - ret = dapm->codec->driver->set_bias_level(dapm->codec, level); - else - dapm->bias_level = level; - } - if (ret == 0) { - if (card && card->set_bias_level_post) - ret = card->set_bias_level_post(card, level); - } + if (ret != 0) + goto out; + + if (dapm->codec && dapm->codec->driver->set_bias_level) + ret = dapm->codec->driver->set_bias_level(dapm->codec, level); + else + dapm->bias_level = level; + if (ret != 0) + goto out; + if (card && card->set_bias_level_post) + ret = card->set_bias_level_post(card, level); +out: trace_snd_soc_bias_level_done(card, level); return ret; |