diff mbox

ALSA: ac97: ac97_patch: Simplify patch_vt1613_specific()

Message ID 1425660102-5419-1-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted
Commit 5371fc0ecdf55b6811ade8a198de8ace2f4e5861
Headers show

Commit Message

Fabio Estevam March 6, 2015, 4:41 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

We can simplify the code by returning patch_build_controls() directly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/pci/ac97/ac97_patch.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Takashi Iwai March 6, 2015, 4:47 p.m. UTC | #1
At Fri,  6 Mar 2015 13:41:42 -0300,
Fabio Estevam wrote:
> 
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> We can simplify the code by returning patch_build_controls() directly.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Thanks, applied.


Takashi

> ---
>  sound/pci/ac97/ac97_patch.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
> index eca2210..f4234ed 100644
> --- a/sound/pci/ac97/ac97_patch.c
> +++ b/sound/pci/ac97/ac97_patch.c
> @@ -3360,14 +3360,8 @@ AC97_SINGLE("DC Offset removal", 0x5a, 10, 1, 0),
>  
>  static int patch_vt1613_specific(struct snd_ac97 *ac97)
>  {
> -	int err;
> -
> -	err = patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
> -				ARRAY_SIZE(snd_ac97_controls_vt1613));
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
> +				    ARRAY_SIZE(snd_ac97_controls_vt1613));
>  };
>  
>  static const struct snd_ac97_build_ops patch_vt1613_ops = {
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index eca2210..f4234ed 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -3360,14 +3360,8 @@  AC97_SINGLE("DC Offset removal", 0x5a, 10, 1, 0),
 
 static int patch_vt1613_specific(struct snd_ac97 *ac97)
 {
-	int err;
-
-	err = patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
-				ARRAY_SIZE(snd_ac97_controls_vt1613));
-	if (err)
-		return err;
-
-	return 0;
+	return patch_build_controls(ac97, &snd_ac97_controls_vt1613[0],
+				    ARRAY_SIZE(snd_ac97_controls_vt1613));
 };
 
 static const struct snd_ac97_build_ops patch_vt1613_ops = {