ALSA: ice1712: remove unneeded return statement
authorSudip Mukherjee <sudip@vectorindia.org>
Fri, 14 Nov 2014 10:39:05 +0000 (16:09 +0530)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Nov 2014 13:16:36 +0000 (14:16 +0100)
the functions:
        snd_ice1712_akm4xxx_build_controls
        snd_ice1712_build_pro_mixer
        snd_ctl_add
        snd_ak4114_build
        prodigy192_ak4114_init
        snd_ak4113_build
are all returning either 0 or a negetive error value.
so we can easily remove the check for a negative value and return
the value instead.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/hoontech.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/ice1712/juli.c
sound/pci/ice1712/prodigy192.c
sound/pci/ice1712/quartet.c

index 59e37c581691e4e2b9072791956c4fee2ea09771..a40001c1d9e8b3ee543c3323e5639cd1fbeb4192 100644 (file)
@@ -309,11 +309,7 @@ static int snd_ice1712_value_init(struct snd_ice1712 *ice)
                return err;
 
        /* ak4524 controls */
-       err = snd_ice1712_akm4xxx_build_controls(ice);
-       if (err < 0)
-               return err;
-
-       return 0;
+       return snd_ice1712_akm4xxx_build_controls(ice);
 }
 
 static int snd_ice1712_ez8_init(struct snd_ice1712 *ice)
index 48a0c330da241b8a809b1d689fb6f7f0897b9949..597533490f2d65d41faf491ae634f4447e140c0a 100644 (file)
@@ -1295,10 +1295,7 @@ static int snd_ice1712_pcm_profi(struct snd_ice1712 *ice, int device, struct snd
                        return err;
        }
 
-       err = snd_ice1712_build_pro_mixer(ice);
-       if (err < 0)
-               return err;
-       return 0;
+       return snd_ice1712_build_pro_mixer(ice);
 }
 
 /*
@@ -1545,10 +1542,9 @@ static int snd_ice1712_ac97_mixer(struct snd_ice1712 *ice)
                        dev_warn(ice->card->dev,
                                 "cannot initialize ac97 for consumer, skipped\n");
                else {
-                       err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97, ice));
-                       if (err < 0)
-                               return err;
-                       return 0;
+                       return snd_ctl_add(ice->card,
+                       snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97,
+                                    ice));
                }
        }
 
@@ -2497,11 +2493,8 @@ static int snd_ice1712_build_controls(struct snd_ice1712 *ice)
        err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_volume_rate, ice));
        if (err < 0)
                return err;
-       err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_peak, ice));
-       if (err < 0)
-               return err;
-
-       return 0;
+       return snd_ctl_add(ice->card,
+                          snd_ctl_new1(&snd_ice1712_mixer_pro_peak, ice));
 }
 
 static int snd_ice1712_free(struct snd_ice1712 *ice)
index f633e3bb4c432da3f6b7470da6809fbac3fab269..ea53167081b82ec4cc7c33b6d4667c582a0f7093 100644 (file)
@@ -2497,11 +2497,8 @@ static int snd_vt1724_build_controls(struct snd_ice1712 *ice)
                        return err;
        }
 
-       err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_mixer_pro_peak, ice));
-       if (err < 0)
-               return err;
-
-       return 0;
+       return snd_ctl_add(ice->card,
+                          snd_ctl_new1(&snd_vt1724_mixer_pro_peak, ice));
 }
 
 static int snd_vt1724_free(struct snd_ice1712 *ice)
index 7a6c0786c55c29f9a104c11298148d9e15d0d3a2..a1536c1a7ed457c7b41d9648de55614e1edccc7c 100644 (file)
@@ -475,11 +475,8 @@ static int juli_add_controls(struct snd_ice1712 *ice)
                return err;
 
        /* only capture SPDIF over AK4114 */
-       err = snd_ak4114_build(spec->ak4114, NULL,
+       return snd_ak4114_build(spec->ak4114, NULL,
                        ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
-       if (err < 0)
-               return err;
-       return 0;
 }
 
 /*
index 1eb151aaa9659060a9e50c4037f2bcfba31cb3cb..3919aed39ca03ab3005e0bfec8ffd2e65f20a147 100644 (file)
@@ -758,10 +758,8 @@ static int prodigy192_init(struct snd_ice1712 *ice)
                        "AK4114 initialized with status %d\n", err);
        } else
                dev_dbg(ice->card->dev, "AK4114 not found\n");
-       if (err < 0)
-               return err;
 
-       return 0;
+       return err;
 }
 
 
index d4caf9d059225d3b6bbdd0b6ef1c26c20ab39f32..6f55e02e5c8492324ffb1fe33c1b250c6c4a47fd 100644 (file)
@@ -833,11 +833,8 @@ static int qtet_add_controls(struct snd_ice1712 *ice)
        if (err < 0)
                return err;
        /* only capture SPDIF over AK4113 */
-       err = snd_ak4113_build(spec->ak4113,
+       return snd_ak4113_build(spec->ak4113,
                        ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
-       if (err < 0)
-               return err;
-       return 0;
 }
 
 static inline int qtet_is_spdif_master(struct snd_ice1712 *ice)