Skip to contentSkip to conversation

ALSA: hda/cmedia: Remove duplicate pin configuration parsing

PATCH In review [email protected] 2 participants 2 messages Apr 1 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/cmedia: Remove duplicate pin configuration parsing

From: wangdicheng <[email protected]>

The cmedia_probe() function calls snd_hda_parse_pin_defcfg() and snd_hda_gen_parse_auto_config() twice unnecessarily. Remove The duplicate code.

---
 sound/hda/codecs/cmedia.c | 7 -------
 1 file changed, 7 deletions(-)
sound/hda/codecs/cmedia.c +0 -7
index e6e12c01339f..88dd80d987d4 100644
@@ -39,13 +39,6 @@ static int cmedia_probe(struct hda_codec *codec, const struct hda_device_id *id)
 		spec->out_vol_mask = (1ULL << 0x10);
 	}
 
-	err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0);
-	if (err < 0)
-		goto error;
-	err = snd_hda_gen_parse_auto_config(codec, cfg);
-	if (err < 0)
-		goto error;
-
 	err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0);
 	if (err < 0)
 		goto error;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · On Wed, 01 Apr 2026 10:26:25 +0200, [email protected] wrote:

From: wangdicheng <[email protected]>

The cmedia_probe() function calls snd_hda_parse_pin_defcfg() and snd_hda_gen_parse_auto_config() twice unnecessarily. Remove The duplicate code.

Oh, that was a silly mistake that was introduced at the big code change.

Applied now with the Fixes tag.

thanks,

Takashi