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>
This commit is contained in:
Jaroslav Kysela 2022-09-21 11:33:22 +02:00 committed by Takashi Iwai
parent 9a737e7f8b
commit 9bf320f0cf

View File

@ -1472,10 +1472,9 @@ static void hdmi_pcm_setup_pin(struct hdmi_spec *spec,
int mux_idx;
bool non_pcm;
if (per_pin->pcm_idx >= 0 && per_pin->pcm_idx < spec->pcm_used)
pcm = get_pcm_rec(spec, per_pin->pcm_idx);
else
if (per_pin->pcm_idx < 0 || per_pin->pcm_idx >= spec->pcm_used)
return;
pcm = get_pcm_rec(spec, per_pin->pcm_idx);
if (!pcm->pcm)
return;
if (!test_bit(per_pin->pcm_idx, &spec->pcm_in_use))