mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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:
parent
9a737e7f8b
commit
9bf320f0cf
1 changed files with 2 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue