X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sound%2Fpci%2Fintel8x0.c;h=608655e9275e5e27e846665dd6dff1f91a010fc1;hb=dec14f8c0eff54549e5747f8a4d1dc6c0347e2dd;hp=19d3391e229f2f7e02615a12344142464dfcb902;hpb=9649745c8670eacc671e9cff72c5c1e346e13036;p=~andy%2Flinux diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 19d3391e229..608655e9275 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -617,7 +617,7 @@ static int snd_intel8x0_ali_codec_semaphore(struct intel8x0 *chip) int time = 100; if (chip->buggy_semaphore) return 0; /* just ignore ... */ - while (time-- && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) + while (--time && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) udelay(1); if (! time && ! chip->in_ac97_init) snd_printk(KERN_WARNING "ali_codec_semaphore timeout\n"); @@ -3058,9 +3058,9 @@ static int __devinit snd_intel8x0_probe(struct pci_dev *pci, int err; struct shortname_table *name; - card = snd_card_new(index, id, THIS_MODULE, 0); - if (card == NULL) - return -ENOMEM; + err = snd_card_create(index, id, THIS_MODULE, 0, &card); + if (err < 0) + return err; if (spdif_aclink < 0) spdif_aclink = check_default_spdif_aclink(pci);