Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

kbuild test robot and committed by
Mark Brown
141f87d4 1fc10044

+1 -6
+1 -6
sound/soc/codecs/sigmadsp.c
··· 633 633 { 634 634 struct snd_kcontrol_new template; 635 635 struct snd_kcontrol *kcontrol; 636 - int ret; 637 636 638 637 memset(&template, 0, sizeof(template)); 639 638 template.iface = SNDRV_CTL_ELEM_IFACE_MIXER; ··· 652 653 kcontrol->private_free = sigmadsp_control_free; 653 654 ctrl->kcontrol = kcontrol; 654 655 655 - ret = snd_ctl_add(sigmadsp->component->card->snd_card, kcontrol); 656 - if (ret) 657 - return ret; 658 - 659 - return 0; 656 + return snd_ctl_add(sigmadsp->component->card->snd_card, kcontrol); 660 657 } 661 658 662 659 static void sigmadsp_activate_ctrl(struct sigmadsp *sigmadsp,