Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: hda/hdmi: Simplify the pcm_idx condition in hdmi_pcm_setup_pin()

Make the code more readable.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220921093322.82609-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Jaroslav Kysela and committed by
Takashi Iwai
9bf320f0 9a737e7f

+2 -3
+2 -3
sound/pci/hda/patch_hdmi.c
··· 1472 1472 int mux_idx; 1473 1473 bool non_pcm; 1474 1474 1475 - if (per_pin->pcm_idx >= 0 && per_pin->pcm_idx < spec->pcm_used) 1476 - pcm = get_pcm_rec(spec, per_pin->pcm_idx); 1477 - else 1475 + if (per_pin->pcm_idx < 0 || per_pin->pcm_idx >= spec->pcm_used) 1478 1476 return; 1477 + pcm = get_pcm_rec(spec, per_pin->pcm_idx); 1479 1478 if (!pcm->pcm) 1480 1479 return; 1481 1480 if (!test_bit(per_pin->pcm_idx, &spec->pcm_in_use))