projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a737e7
)
ALSA: hda/hdmi: Simplify the pcm_idx condition in hdmi_pcm_setup_pin()
author
Jaroslav Kysela
<perex@perex.cz>
Wed, 21 Sep 2022 09:33:22 +0000
(11:33 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Wed, 21 Sep 2022 10:11:41 +0000
(12:11 +0200)
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>
sound/pci/hda/patch_hdmi.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/patch_hdmi.c
b/sound/pci/hda/patch_hdmi.c
index 1eb894e6cdf1b1bcaad1e92d059f326aca4c057b..11c22dfced068452f9af291791834792890cc05d 100644
(file)
--- a/
sound/pci/hda/patch_hdmi.c
+++ b/
sound/pci/hda/patch_hdmi.c
@@
-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))