X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fpci%2Fhda%2Fhda_generic.c;h=d0eb9f2250aa013ec578f3ee62a65871cf96b983;hb=2ecc26b87a2b3e8650d3c7fe3fc85a8c73d5560d;hp=2d046abb591108bc9033be2f5ce16b6a4ab95c6b;hpb=1bdf7a78c2b21fb94dfe7994dbe89310b18479d2;p=linux-2.6-omap-h63xx.git diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 2d046abb591..d0eb9f2250a 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -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;