]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda/cmedia: Remove duplicate pin configuration parsing
authorwangdicheng <wangdicheng@kylinos.cn>
Wed, 1 Apr 2026 08:26:25 +0000 (16:26 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 1 Apr 2026 09:01:33 +0000 (11:01 +0200)
The cmedia_probe() function calls snd_hda_parse_pin_defcfg() and
snd_hda_gen_parse_auto_config() twice unnecessarily. Remove The
duplicate code.

Fixes: 0f1e8306dcbe ("ALSA: hda/cmedia: Rewrite to new probe method")
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260401082625.157868-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/codecs/cmedia.c

index e6e12c01339f606175bd09864a1c158bce789f05..88dd80d987d414d1f4eab514067a2faad556ec36 100644 (file)
@@ -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;