X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fisa%2Fes1688%2Fes1688.c;fp=sound%2Fisa%2Fes1688%2Fes1688.c;h=50d23cf3d7ccea2fd58a7c919941c40401569c03;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=7f29f56e405b29a26e0c62d43182e804f0555451;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index 7f29f56e4..50d23cf3d 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c @@ -153,7 +153,7 @@ static int __init snd_es1688_probe(struct platform_device *pdev) if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, chip->mpu_port, 0, xmpu_irq, - IRQF_DISABLED, + SA_INTERRUPT, NULL)) < 0) goto _err; } @@ -207,17 +207,13 @@ static int __init alsa_card_es1688_init(void) return err; cards = 0; - for (i = 0; i < SNDRV_CARDS; i++) { + for (i = 0; i < SNDRV_CARDS && enable[i]; i++) { struct platform_device *device; - if (! enable[i]) - continue; device = platform_device_register_simple(ES1688_DRIVER, i, NULL, 0); - if (IS_ERR(device)) - continue; - if (!platform_get_drvdata(device)) { - platform_device_unregister(device); - continue; + if (IS_ERR(device)) { + err = PTR_ERR(device); + goto errout; } devices[i] = device; cards++; @@ -226,10 +222,14 @@ static int __init alsa_card_es1688_init(void) #ifdef MODULE printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n"); #endif - snd_es1688_unregister_all(); - return -ENODEV; + err = -ENODEV; + goto errout; } return 0; + + errout: + snd_es1688_unregister_all(); + return err; } static void __exit alsa_card_es1688_exit(void)