Skip to content

Commit

Permalink
ASoC: sigmadsp: fix simple_return.cocci warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kbuild test robot authored and Mark Brown committed Nov 25, 2014
1 parent 1fc1004 commit 141f87d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sound/soc/codecs/sigmadsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down

0 comments on commit 141f87d

Please sign in to comment.