diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-06 13:15:19 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-06 16:46:19 -0400 |
commit | 171ec6b0897422099438a9c66546380d0fa2ff44 (patch) | |
tree | affa8365cd316153abcd387ccd6f264842079170 /sound/soc/soc-dapm.c | |
parent | 4113e443161f4fd3b33e8015a1edc190e2296790 (diff) |
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, | |||
143 | 143 | ||
144 | if (card && card->set_bias_level) | 144 | if (card && card->set_bias_level) |
145 | ret = card->set_bias_level(card, level); | 145 | ret = card->set_bias_level(card, level); |
146 | if (ret == 0) { | 146 | if (ret != 0) |
147 | if (dapm->codec && dapm->codec->driver->set_bias_level) | 147 | goto out; |
148 | ret = dapm->codec->driver->set_bias_level(dapm->codec, level); | 148 | |
149 | else | 149 | if (dapm->codec && dapm->codec->driver->set_bias_level) |
150 | dapm->bias_level = level; | 150 | ret = dapm->codec->driver->set_bias_level(dapm->codec, level); |
151 | } | 151 | else |
152 | if (ret == 0) { | 152 | dapm->bias_level = level; |
153 | if (card && card->set_bias_level_post) | 153 | if (ret != 0) |
154 | ret = card->set_bias_level_post(card, level); | 154 | goto out; |
155 | } | ||
156 | 155 | ||
156 | if (card && card->set_bias_level_post) | ||
157 | ret = card->set_bias_level_post(card, level); | ||
158 | out: | ||
157 | trace_snd_soc_bias_level_done(card, level); | 159 | trace_snd_soc_bias_level_done(card, level); |
158 | 160 | ||
159 | return ret; | 161 | return ret; |