Merge tag 'sound-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[sfrench/cifs-2.6.git] / sound / pci / hda / hda_bind.c
index c572fb5886d5d63f56ead62ab2d5e5e192d75245..cae9a975cbcca809bdd59993e1343eebd4c6ad76 100644 (file)
@@ -248,6 +248,13 @@ static bool is_likely_hdmi_codec(struct hda_codec *codec)
 {
        hda_nid_t nid;
 
+       /*
+        * For ASoC users, if snd_hda_hdmi_codec module is denylisted and any
+        * event causes i915 enumeration to fail, ->wcaps remains uninitialized.
+        */
+       if (!codec->wcaps)
+               return true;
+
        for_each_hda_codec_node(nid, codec) {
                unsigned int wcaps = get_wcaps(codec, nid);
                switch (get_wcaps_type(wcaps)) {