aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudip Mukherjee <sudip@vectorindia.org>2014-11-14 05:39:05 -0500
committerTakashi Iwai <tiwai@suse.de>2014-11-14 08:16:36 -0500
commit387417b56295ef93d7cb38e1721826c85dfe897c (patch)
treef3f01a70e02e6fc5447dfbd299e681f4dc17dc83
parent9547c0999e50fd624cab52f94a79f0fd27a7cb84 (diff)
ALSA: ice1712: remove unneeded return statement
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>
-rw-r--r--sound/pci/ice1712/hoontech.c6
-rw-r--r--sound/pci/ice1712/ice1712.c19
-rw-r--r--sound/pci/ice1712/ice1724.c7
-rw-r--r--sound/pci/ice1712/juli.c5
-rw-r--r--sound/pci/ice1712/prodigy192.c4
-rw-r--r--sound/pci/ice1712/quartet.c5
6 files changed, 12 insertions, 34 deletions
diff --git a/sound/pci/ice1712/hoontech.c b/sound/pci/ice1712/hoontech.c
index 59e37c581691..a40001c1d9e8 100644
--- a/sound/pci/ice1712/hoontech.c
+++ b/sound/pci/ice1712/hoontech.c
@@ -309,11 +309,7 @@ static int snd_ice1712_value_init(struct snd_ice1712 *ice)
309 return err; 309 return err;
310 310
311 /* ak4524 controls */ 311 /* ak4524 controls */
312 err = snd_ice1712_akm4xxx_build_controls(ice); 312 return snd_ice1712_akm4xxx_build_controls(ice);
313 if (err < 0)
314 return err;
315
316 return 0;
317} 313}
318 314
319static int snd_ice1712_ez8_init(struct snd_ice1712 *ice) 315static int snd_ice1712_ez8_init(struct snd_ice1712 *ice)
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index 48a0c330da24..597533490f2d 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -1295,10 +1295,7 @@ static int snd_ice1712_pcm_profi(struct snd_ice1712 *ice, int device, struct snd
1295 return err; 1295 return err;
1296 } 1296 }
1297 1297
1298 err = snd_ice1712_build_pro_mixer(ice); 1298 return snd_ice1712_build_pro_mixer(ice);
1299 if (err < 0)
1300 return err;
1301 return 0;
1302} 1299}
1303 1300
1304/* 1301/*
@@ -1545,10 +1542,9 @@ static int snd_ice1712_ac97_mixer(struct snd_ice1712 *ice)
1545 dev_warn(ice->card->dev, 1542 dev_warn(ice->card->dev,
1546 "cannot initialize ac97 for consumer, skipped\n"); 1543 "cannot initialize ac97 for consumer, skipped\n");
1547 else { 1544 else {
1548 err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97, ice)); 1545 return snd_ctl_add(ice->card,
1549 if (err < 0) 1546 snd_ctl_new1(&snd_ice1712_mixer_digmix_route_ac97,
1550 return err; 1547 ice));
1551 return 0;
1552 } 1548 }
1553 } 1549 }
1554 1550
@@ -2497,11 +2493,8 @@ static int snd_ice1712_build_controls(struct snd_ice1712 *ice)
2497 err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_volume_rate, ice)); 2493 err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_volume_rate, ice));
2498 if (err < 0) 2494 if (err < 0)
2499 return err; 2495 return err;
2500 err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_mixer_pro_peak, ice)); 2496 return snd_ctl_add(ice->card,
2501 if (err < 0) 2497 snd_ctl_new1(&snd_ice1712_mixer_pro_peak, ice));
2502 return err;
2503
2504 return 0;
2505} 2498}
2506 2499
2507static int snd_ice1712_free(struct snd_ice1712 *ice) 2500static int snd_ice1712_free(struct snd_ice1712 *ice)
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index f633e3bb4c43..ea53167081b8 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -2497,11 +2497,8 @@ static int snd_vt1724_build_controls(struct snd_ice1712 *ice)
2497 return err; 2497 return err;
2498 } 2498 }
2499 2499
2500 err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_mixer_pro_peak, ice)); 2500 return snd_ctl_add(ice->card,
2501 if (err < 0) 2501 snd_ctl_new1(&snd_vt1724_mixer_pro_peak, ice));
2502 return err;
2503
2504 return 0;
2505} 2502}
2506 2503
2507static int snd_vt1724_free(struct snd_ice1712 *ice) 2504static int snd_vt1724_free(struct snd_ice1712 *ice)
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c
index 7a6c0786c55c..a1536c1a7ed4 100644
--- a/sound/pci/ice1712/juli.c
+++ b/sound/pci/ice1712/juli.c
@@ -475,11 +475,8 @@ static int juli_add_controls(struct snd_ice1712 *ice)
475 return err; 475 return err;
476 476
477 /* only capture SPDIF over AK4114 */ 477 /* only capture SPDIF over AK4114 */
478 err = snd_ak4114_build(spec->ak4114, NULL, 478 return snd_ak4114_build(spec->ak4114, NULL,
479 ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); 479 ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
480 if (err < 0)
481 return err;
482 return 0;
483} 480}
484 481
485/* 482/*
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c
index 1eb151aaa965..3919aed39ca0 100644
--- a/sound/pci/ice1712/prodigy192.c
+++ b/sound/pci/ice1712/prodigy192.c
@@ -758,10 +758,8 @@ static int prodigy192_init(struct snd_ice1712 *ice)
758 "AK4114 initialized with status %d\n", err); 758 "AK4114 initialized with status %d\n", err);
759 } else 759 } else
760 dev_dbg(ice->card->dev, "AK4114 not found\n"); 760 dev_dbg(ice->card->dev, "AK4114 not found\n");
761 if (err < 0)
762 return err;
763 761
764 return 0; 762 return err;
765} 763}
766 764
767 765
diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c
index d4caf9d05922..6f55e02e5c84 100644
--- a/sound/pci/ice1712/quartet.c
+++ b/sound/pci/ice1712/quartet.c
@@ -833,11 +833,8 @@ static int qtet_add_controls(struct snd_ice1712 *ice)
833 if (err < 0) 833 if (err < 0)
834 return err; 834 return err;
835 /* only capture SPDIF over AK4113 */ 835 /* only capture SPDIF over AK4113 */
836 err = snd_ak4113_build(spec->ak4113, 836 return snd_ak4113_build(spec->ak4113,
837 ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); 837 ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);
838 if (err < 0)
839 return err;
840 return 0;
841} 838}
842 839
843static inline int qtet_is_spdif_master(struct snd_ice1712 *ice) 840static inline int qtet_is_spdif_master(struct snd_ice1712 *ice)