Skip to contentSkip to conversation

ALSA: hda - Remove superfluous pcm NULL check

PATCH New Takashi Iwai 1 participant 1 message Aug 26, 2015 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda - Remove superfluous pcm NULL check

The variable pcm can be never NULL since it was rewritten with list_for_each_entry().

---
 sound/pci/hda/hda_codec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/pci/hda/hda_codec.c +1 -2
index 2c021911f88a..37f43a1b34ef 100644
@@ -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,
Signature · 1 line
2.5.0