]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: hda - Remove superfluous pcm NULL check
authorTakashi Iwai <tiwai@suse.de>
Wed, 26 Aug 2015 12:21:14 +0000 (14:21 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 26 Aug 2015 12:21:14 +0000 (14:21 +0200)
The variable pcm can be never NULL since it was rewritten with
list_for_each_entry().

Suggested-by: Markus Osterhoff <linux-kernel@k-raum.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c

index 2c021911f88a9f597c7dc4f2f810c5102b25bed3..37f43a1b34ef1f5f48682230055c0f01d9a07449 100644 (file)
@@ -3102,8 +3102,7 @@ static int add_std_chmaps(struct hda_codec *codec)
                        struct snd_pcm_chmap *chmap;
                        const struct snd_pcm_chmap_elem *elem;
 
-                       if (!pcm || !pcm->pcm || pcm->own_chmap ||
-                           !hinfo->substreams)
+                       if (!pcm->pcm || pcm->own_chmap || !hinfo->substreams)
                                continue;
                        elem = hinfo->chmap ? hinfo->chmap : snd_pcm_std_chmaps;
                        err = snd_pcm_add_chmap_ctls(pcm->pcm, str, elem,