diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-04-17 07:41:48 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-04-18 08:00:14 +0200 |
commit | f609bf6b21951569036d23cf66a1317d066ef9ed (patch) | |
tree | 8fb99fdc3d3ab230d86e83fd354998de8328e84b | |
parent | ALSA: hda: LNL: add HD Audio PCI ID (diff) | |
download | linux-f609bf6b21951569036d23cf66a1317d066ef9ed.tar.xz linux-f609bf6b21951569036d23cf66a1317d066ef9ed.zip |
ALSA: hda/hdmi: Remove some dead code
These snd_BUG_ON() can never trigger, so just remove them to save a few
LoC.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/91a31341f32d493bcc6c4515178ce0755ac1aa70.1681710069.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 9ea633fe9339..ae17e21e57c3 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2093,10 +2093,6 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, goto unlock; } - if (snd_BUG_ON(pin_idx < 0)) { - err = -EINVAL; - goto unlock; - } per_pin = get_pin(spec, pin_idx); /* Verify pin:cvt selections to avoid silent audio after S3. @@ -2188,13 +2184,13 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, snd_hda_spdif_ctls_unassign(codec, pcm_idx); clear_bit(pcm_idx, &spec->pcm_in_use); pin_idx = hinfo_to_pin_index(codec, hinfo); + /* + * In such a case, return 0 to match the behavior in + * hdmi_pcm_open() + */ if (pin_idx < 0) goto unlock; - if (snd_BUG_ON(pin_idx < 0)) { - err = -EINVAL; - goto unlock; - } per_pin = get_pin(spec, pin_idx); if (spec->dyn_pin_out) { |