diff options
author | kbuild test robot <fengguang.wu@intel.com> | 2014-11-25 04:49:44 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-25 11:07:53 +0000 |
commit | 141f87d4d6ab36bfcd4c5683cf90abf83b306d90 (patch) | |
tree | b3c0453a32511d9858c31d57460abd98c971228a /sound/soc/codecs/sigmadsp.c | |
parent | 1fc10044d76e86b71f724988c7cbd8205bb903a8 (diff) | |
download | linux-stable-141f87d4d6ab36bfcd4c5683cf90abf83b306d90.tar.gz linux-stable-141f87d4d6ab36bfcd4c5683cf90abf83b306d90.tar.bz2 linux-stable-141f87d4d6ab36bfcd4c5683cf90abf83b306d90.zip |
ASoC: sigmadsp: fix simple_return.cocci warnings
sound/soc/codecs/sigmadsp.c:656:1-4: WARNING: end returns can be simpified and declaration on line 636 can be dropped
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>
Diffstat (limited to 'sound/soc/codecs/sigmadsp.c')
-rw-r--r-- | sound/soc/codecs/sigmadsp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/soc/codecs/sigmadsp.c b/sound/soc/codecs/sigmadsp.c index 6abefd27b86c..34fdc402c1cc 100644 --- a/sound/soc/codecs/sigmadsp.c +++ b/sound/soc/codecs/sigmadsp.c @@ -633,7 +633,6 @@ static int sigmadsp_alloc_control(struct sigmadsp *sigmadsp, { struct snd_kcontrol_new template; struct snd_kcontrol *kcontrol; - int ret; memset(&template, 0, sizeof(template)); template.iface = SNDRV_CTL_ELEM_IFACE_MIXER; @@ -653,11 +652,7 @@ static int sigmadsp_alloc_control(struct sigmadsp *sigmadsp, kcontrol->private_free = sigmadsp_control_free; ctrl->kcontrol = kcontrol; - ret = snd_ctl_add(sigmadsp->component->card->snd_card, kcontrol); - if (ret) - return ret; - - return 0; + return snd_ctl_add(sigmadsp->component->card->snd_card, kcontrol); } static void sigmadsp_activate_ctrl(struct sigmadsp *sigmadsp, |