diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-08-26 12:21:14 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-08-26 12:21:14 (GMT) |
commit | b25cf30a013195a69c167209d13c19b90a7450f2 (patch) | |
tree | 1b88f977fc02afbaf46003ef81cad6a1a2fde78e /sound/pci/hda | |
parent | a92d5ee8666afcb4abc7686d7b760f0fb7a0c14c (diff) | |
download | linux-b25cf30a013195a69c167209d13c19b90a7450f2.tar.xz |
ALSA: hda - Remove superfluous pcm NULL check
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>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 2c02191..37f43a1 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -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, |