Commit 0f9f751c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ymfpci oops fix

If the driver fails partway through probing, the recovery code will call
ac97_release_codec(NULL), which oopses.
parent ff95eddd
......@@ -2628,7 +2628,8 @@ static int __devinit ymf_probe_one(struct pci_dev *pcidev, const struct pci_devi
out_release_region:
release_mem_region(pci_resource_start(pcidev, 0), 0x8000);
out_free:
ac97_release_codec(codec->ac97_codec[0]);
if (codec->ac97_codec[0])
ac97_release_codec(codec->ac97_codec[0]);
return -ENODEV;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment