Commit 9bf320f0 authored by Jaroslav Kysela's avatar Jaroslav Kysela Committed by Takashi Iwai

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

Make the code more readable.
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220921093322.82609-1-perex@perex.czSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9a737e7f
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment