]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Simplify logic in snd_soc_dapm_set_bias_level()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 6 Jun 2011 17:15:19 +0000 (18:15 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 6 Jun 2011 20:46:19 +0000 (21:46 +0100)
No functional changes but much less indentation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/soc-dapm.c

index 4452b571c1b8d4ad3e5049516ccc603e2157dc2a..d989dd71e3ac77e5d32b9eb1f8e1fa57f0695c48 100644 (file)
@@ -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;