Skip to content

Commit

Permalink
ALSA: hda - Remove superfluous pcm NULL check
Browse files Browse the repository at this point in the history
The variable pcm can be never NULL since it was rewritten with
list_for_each_entry().

Suggested-by: Markus Osterhoff <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Aug 26, 2015
1 parent a92d5ee commit b25cf30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b25cf30

Please sign in to comment.