Skip to contentSkip to conversation

ALSA: ac97: ac97_patch: Simplify patch_vt1613_specific()

PATCH Applied Fabio Estevam 2 participants 2 messages Mar 6, 2015 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: ac97: ac97_patch: Simplify patch_vt1613_specific()

From: Fabio Estevam <[email protected]>

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

---
 sound/pci/ac97/ac97_patch.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
sound/pci/ac97/ac97_patch.c +2 -8
index eca2210..f4234ed 100644
@@ -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 = {
Signature · 1 line
1.9.1
Applied
#1 lore raw

At Fri, 6 Mar 2015 13:41:42 -0300,

Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Thanks, applied.

Takashi

Quoted 28 lines
---
 sound/pci/ac97/ac97_patch.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
sound/pci/ac97/ac97_patch.c +2 -8
index eca2210..f4234ed 100644
@@ -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 = {
Signature · 1 line
1.9.1