Skip to content

Commit 82420bd

Browse files
committed
ALSA: hda/hdmi: Fix breakage at probing nvhdmi-mcp driver
After restructuring and splitting the HDMI codec driver code, each HDMI codec driver contains the own build_controls and build_pcms ops. A copy-n-paste error put the wrong entries for nvhdmi-mcp driver; both build_controls and build_pcms are swapped. Unfortunately both callbacks have the very same form, and the compiler didn't complain it, either. This resulted in a NULL dereference because the PCM instance hasn't been initialized at calling the build_controls callback. Fix it by passing the proper entries. Fixes: ad781b5 ("ALSA: hda/hdmi: Rewrite to new probe method") Cc: <stable@vger.kernel.org> Link: https://bugzilla.kernel.org/show_bug.cgi?id=220743 Link: https://patch.msgid.link/20251106104647.25805-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent b98b69c commit 82420bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/hda/codecs/hdmi/nvhdmi-mcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ static int nvhdmi_mcp_probe(struct hda_codec *codec,
350350
static const struct hda_codec_ops nvhdmi_mcp_codec_ops = {
351351
.probe = nvhdmi_mcp_probe,
352352
.remove = snd_hda_hdmi_simple_remove,
353-
.build_controls = nvhdmi_mcp_build_pcms,
354-
.build_pcms = nvhdmi_mcp_build_controls,
353+
.build_pcms = nvhdmi_mcp_build_pcms,
354+
.build_controls = nvhdmi_mcp_build_controls,
355355
.init = nvhdmi_mcp_init,
356356
.unsol_event = snd_hda_hdmi_simple_unsol_event,
357357
};

0 commit comments

Comments
 (0)