]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/hda/hda_generic.c
Merge branch 'atmel'
[linux-2.6-omap-h63xx.git] / sound / pci / hda / hda_generic.c
index 2d046abb591108bc9033be2f5ce16b6a4ab95c6b..d0eb9f2250aa013ec578f3ee62a65871cf96b983 100644 (file)
@@ -98,7 +98,7 @@ static int add_new_node(struct hda_codec *codec, struct hda_gspec *spec, hda_nid
        struct hda_gnode *node;
        int nconns;
 
-       node = kcalloc(1, sizeof(*node), GFP_KERNEL);
+       node = kzalloc(sizeof(*node), GFP_KERNEL);
        if (node == NULL)
                return -ENOMEM;
        node->nid = nid;
@@ -881,7 +881,10 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec)
        struct hda_gspec *spec;
        int err;
 
-       spec = kcalloc(1, sizeof(*spec), GFP_KERNEL);
+       if(!codec->afg)
+               return 0;
+
+       spec = kzalloc(sizeof(*spec), GFP_KERNEL);
        if (spec == NULL) {
                printk(KERN_ERR "hda_generic: can't allocate spec\n");
                return -ENOMEM;