Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-block.git] / sound / pci / hda / hda_codec.c
index 6c51b8363f8b73ccea5f8ff65558a298ddde8524..5346631df1eccd325d4ea6c95ed4df77b5fb80d3 100644 (file)
@@ -108,7 +108,7 @@ static int add_conn_list(struct hda_codec *codec, hda_nid_t nid, int len,
 {
        struct hda_conn_list *p;
 
-       p = kmalloc(sizeof(*p) + len * sizeof(hda_nid_t), GFP_KERNEL);
+       p = kmalloc(struct_size(p, conns, len), GFP_KERNEL);
        if (!p)
                return -ENOMEM;
        p->len = len;
@@ -1002,7 +1002,7 @@ int snd_hda_codec_update_widgets(struct hda_codec *codec)
        hda_nid_t fg;
        int err;
 
-       err = snd_hdac_refresh_widgets(&codec->core, true);
+       err = snd_hdac_refresh_widgets(&codec->core);
        if (err < 0)
                return err;