ASoC: fsl: imx-mc13783: Simplify trivial if-return sequence
authorFabio Estevam <fabio.estevam@freescale.com>
Sat, 9 May 2015 15:45:53 +0000 (12:45 -0300)
committerMark Brown <broonie@kernel.org>
Mon, 11 May 2015 15:13:45 +0000 (16:13 +0100)
Simplify a trivial if-return sequence.  Possibly combine with a
preceding function call.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/simple_return.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/imx-mc13783.c

index 9e6493d4e7ff92e6a328dfa2d062349a314d88a0..bb0459018b45faa695c557371887d57d3fce4005 100644 (file)
@@ -45,11 +45,7 @@ static int imx_mc13783_hifi_hw_params(struct snd_pcm_substream *substream,
        if (ret)
                return ret;
 
-       ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 0x3, 2, 16);
-       if (ret)
-               return ret;
-
-       return 0;
+       return snd_soc_dai_set_tdm_slot(cpu_dai, 0x3, 0x3, 2, 16);
 }
 
 static struct snd_soc_ops imx_mc13783_hifi_ops = {