aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/au88x0/au88x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/au88x0/au88x0.c')
-rw-r--r--sound/pci/au88x0/au88x0.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 7d9184f7367a..126870ec063a 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -151,14 +151,18 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
151 // check PCI availability (DMA). 151 // check PCI availability (DMA).
152 if ((err = pci_enable_device(pci)) < 0) 152 if ((err = pci_enable_device(pci)) < 0)
153 return err; 153 return err;
154 if (pci_set_dma_mask(pci, DMA_32BIT_MASK)) { 154 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 ||
155 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) {
155 printk(KERN_ERR "error to set DMA mask\n"); 156 printk(KERN_ERR "error to set DMA mask\n");
157 pci_disable_device(pci);
156 return -ENXIO; 158 return -ENXIO;
157 } 159 }
158 160
159 chip = kzalloc(sizeof(*chip), GFP_KERNEL); 161 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
160 if (chip == NULL) 162 if (chip == NULL) {
163 pci_disable_device(pci);
161 return -ENOMEM; 164 return -ENOMEM;
165 }
162 166
163 chip->card = card; 167 chip->card = card;
164 168
@@ -208,6 +212,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
208 goto alloc_out; 212 goto alloc_out;
209 } 213 }
210 214
215 snd_card_set_dev(card, &pci->dev);
216
211 *rchip = chip; 217 *rchip = chip;
212 218
213 return 0; 219 return 0;