X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fisa%2Fcs423x%2Fcs4236.c;h=07ffd5c22e81918eeb0c7647f3e19428f7832c99;hb=ae3e0218621db0590163b2d5c424ef1f340e3cc6;hp=382bb17ef49f08941fb88c76c037ff54caf02b57;hpb=5b67e8dd5ae889fea7d01b905a570fa9a37b8785;p=linux-2.6-omap-h63xx.git diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 382bb17ef49..07ffd5c22e8 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c @@ -535,7 +535,7 @@ static int __devinit snd_cs423x_probe(struct snd_card *card, int dev) if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, mpu_port[dev], 0, mpu_irq[dev], - mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) + mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL) < 0) printk(KERN_WARNING IDENT ": MPU401 not detected\n"); } @@ -780,9 +780,11 @@ static int __init alsa_card_cs423x_init(void) continue; device = platform_device_register_simple(CS423X_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; snd_cs423x_devices++; @@ -802,14 +804,10 @@ static int __init alsa_card_cs423x_init(void) #ifdef MODULE printk(KERN_ERR IDENT " soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_cs423x_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_cs423x_unregister_all(); - return err; } static void __exit alsa_card_cs423x_exit(void)