[2.6 patch] sound/pci/hda/patch_realtek.c: remove dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 19, 2007 at 12:20:36PM +0200, Takashi Iwai wrote:
> At Fri, 15 Jun 2007 23:45:31 +0200,
> Adrian Bunk wrote:
> > 
> > This patch removes dead code spotted by the Coverity checker.
> > 
> > Signed-off-by: Adrian Bunk <[email protected]>
> 
> This appears to be a copy-and-paste error from other
> auto-configuration code.  I fixed it on ALSA tree now so that it'll be
> merged to the next mm...

Thanks.

The patch below removes the remaining and really dead code.

> thanks,
> 
> Takashi

cu
Adrian


<--  snip  -->


This patch removes some dead code spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <[email protected]>

---

 sound/pci/hda/patch_realtek.c |    2 --
 1 file changed, 2 deletions(-)

--- linux-2.6.22-rc6-mm1/sound/pci/hda/patch_realtek.c.old	2007-06-29 22:47:35.000000000 +0200
+++ linux-2.6.22-rc6-mm1/sound/pci/hda/patch_realtek.c	2007-06-29 23:45:48.000000000 +0200
@@ -11170,32 +11170,30 @@ static int alc662_parse_auto_config(stru
 	err = alc662_auto_create_analog_input_ctls(spec, &spec->autocfg);
 	if (err < 0)
 		return err;
 
 	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
 
 	if (spec->autocfg.dig_out_pin)
 		spec->multiout.dig_out_nid = ALC880_DIGOUT_NID;
 
 	if (spec->kctl_alloc)
 		spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
 
 	spec->num_mux_defs = 1;
 	spec->input_mux = &spec->private_imux;
 	
-	if (err < 0)
-		return err;
 	spec->init_verbs[spec->num_init_verbs++] = alc662_auto_init_verbs;
 	spec->mixers[spec->num_mixers] = alc662_capture_mixer;
 	spec->num_mixers++;
 	return 1;
 }
 
 /* additional initialization for auto-configuration model */
 static void alc662_auto_init(struct hda_codec *codec)
 {
 	alc662_auto_init_multi_out(codec);
 	alc662_auto_init_hp_out(codec);
 	alc662_auto_init_analog_input(codec);
 }
 
 static int patch_alc662(struct hda_codec *codec)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux