ALSA: hda - Remove locally dead codes
authorTakashi Iwai <tiwai@suse.de>
Mon, 28 Oct 2013 11:00:35 +0000 (12:00 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 29 Oct 2013 10:37:30 +0000 (11:37 +0100)
Reported by coverity.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/patch_realtek.c

index 0faab3b4dabb7e182033764f053064f890cb636c..de1a7670ba0dfe5f165277170a19aae9004a5c4b 100644 (file)
@@ -2634,8 +2634,7 @@ static int map_slaves(struct hda_codec *codec, const char * const *slaves,
        items = codec->mixers.list;
        for (i = 0; i < codec->mixers.used; i++) {
                struct snd_kcontrol *sctl = items[i].kctl;
-               if (!sctl || !sctl->id.name ||
-                   sctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER)
+               if (!sctl || sctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER)
                        continue;
                for (s = slaves; *s; s++) {
                        char tmpname[sizeof(sctl->id.name)];
index 1f0a040a98182a48640bd01167fec4efb2ea4d43..894703532ab7fdff1a400b67d322920f8c7c304f 100644 (file)
@@ -554,8 +554,6 @@ do_sku:
                        nid = portd;
                else if (tmp == 3)
                        nid = porti;
-               else
-                       return 1;
                if (found_in_nid_list(nid, spec->gen.autocfg.line_out_pins,
                                      spec->gen.autocfg.line_outs))
                        return 1;