ASoC: zx: fix simple_return.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Thu, 4 Jun 2015 15:57:20 +0000 (23:57 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jun 2015 16:07:59 +0000 (17:07 +0100)
sound/soc/zte/zx296702-spdif.c:191:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/zte/zx296702-spdif.c

index 27d940c37f79296da3cdaaef01161346b9714751..4a93bca232ff0c493ed0f02c245979247ca13ef8 100644 (file)
@@ -188,11 +188,7 @@ static int zx_spdif_hw_params(struct snd_pcm_substream *substream,
        ret = zx_spdif_chanstats(zx_spdif->reg_base, rate);
        if (ret)
                return ret;
-       ret = clk_set_rate(spdif->dai_clk, rate * ch_num * ZX_SPDIF_CLK_RAT);
-       if (ret)
-               return ret;
-
-       return 0;
+       return clk_set_rate(spdif->dai_clk, rate * ch_num * ZX_SPDIF_CLK_RAT);
 }
 
 static void zx_spdif_cfg_tx(void __iomem *base, int on)