aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/isa/ad1816a/ad1816a.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 59034507175b..fc88a31da6f5 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -129,8 +129,8 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar
129 } 129 }
130 acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL); 130 acard->devmpu = pnp_request_card_device(card, id->devs[1].id, NULL);
131 if (acard->devmpu == NULL) { 131 if (acard->devmpu == NULL) {
132 kfree(cfg); 132 mpu_port[dev] = -1;
133 return -EBUSY; 133 snd_printk(KERN_WARNING PFX "MPU401 device busy, skipping.\n");
134 } 134 }
135 135
136 pdev = acard->dev; 136 pdev = acard->dev;
@@ -162,6 +162,10 @@ static int __devinit snd_card_ad1816a_pnp(int dev, struct snd_card_ad1816a *acar
162 dma2[dev] = pnp_dma(pdev, 1); 162 dma2[dev] = pnp_dma(pdev, 1);
163 irq[dev] = pnp_irq(pdev, 0); 163 irq[dev] = pnp_irq(pdev, 0);
164 164
165 if (acard->devmpu == NULL) {
166 kfree(cfg);
167 return 0;
168 }
165 pdev = acard->devmpu; 169 pdev = acard->devmpu;
166 pnp_init_resource_table(cfg); 170 pnp_init_resource_table(cfg);
167 171