git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
sound
/
isa
/
cs423x
/
cs4231.c
diff --git
a/sound/isa/cs423x/cs4231.c
b/sound/isa/cs423x/cs4231.c
index
696a5c8
..
ab67b5c
100644
(file)
--- a/
sound/isa/cs423x/cs4231.c
+++ b/
sound/isa/cs423x/cs4231.c
@@
-122,7
+122,7
@@
static int __init snd_cs4231_probe(struct platform_device *pdev)
if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
mpu_port[dev], 0,
mpu_irq[dev],
if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
mpu_port[dev], 0,
mpu_irq[dev],
- mpu_irq[dev] >= 0 ?
IRQF_DISABLED
: 0,
+ mpu_irq[dev] >= 0 ?
SA_INTERRUPT
: 0,
NULL) < 0)
printk(KERN_WARNING "cs4231: MPU401 not detected\n");
}
NULL) < 0)
printk(KERN_WARNING "cs4231: MPU401 not detected\n");
}
@@
-203,17
+203,13
@@
static int __init alsa_card_cs4231_init(void)
return err;
cards = 0;
return err;
cards = 0;
- for (i = 0; i < SNDRV_CARDS; i++) {
+ for (i = 0; i < SNDRV_CARDS
&& enable[i]
; i++) {
struct platform_device *device;
struct platform_device *device;
- if (! enable[i])
- continue;
device = platform_device_register_simple(SND_CS4231_DRIVER,
i, NULL, 0);
device = platform_device_register_simple(SND_CS4231_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++;
}
devices[i] = device;
cards++;
@@
-222,10
+218,14
@@
static int __init alsa_card_cs4231_init(void)
#ifdef MODULE
printk(KERN_ERR "CS4231 soundcard not found or device busy\n");
#endif
#ifdef MODULE
printk(KERN_ERR "CS4231 soundcard not found or device busy\n");
#endif
-
snd_cs4231_unregister_all()
;
-
return -ENODEV
;
+
err = -ENODEV
;
+
goto errout
;
}
return 0;
}
return 0;
+
+ errout:
+ snd_cs4231_unregister_all();
+ return err;
}
static void __exit alsa_card_cs4231_exit(void)
}
static void __exit alsa_card_cs4231_exit(void)