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
/
drivers
/
serial-u16550.c
diff --git
a/sound/drivers/serial-u16550.c
b/sound/drivers/serial-u16550.c
index
c01b4c5
..
112ddf7
100644
(file)
--- a/
sound/drivers/serial-u16550.c
+++ b/
sound/drivers/serial-u16550.c
@@
-789,7
+789,6
@@
static int __init snd_uart16550_create(struct snd_card *card,
if ((err = snd_uart16550_detect(uart)) <= 0) {
printk(KERN_ERR "no UART detected at 0x%lx\n", iobase);
if ((err = snd_uart16550_detect(uart)) <= 0) {
printk(KERN_ERR "no UART detected at 0x%lx\n", iobase);
- snd_uart16550_free(uart);
return -ENODEV;
}
return -ENODEV;
}
@@
-990,14
+989,14
@@
static int __init alsa_card_serial_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_SERIAL_DRIVER,
i, NULL, 0);
device = platform_device_register_simple(SND_SERIAL_DRIVER,
i, NULL, 0);
- if (IS_ERR(device))
- continue;
+ if (IS_ERR(device)) {
+ err = PTR_ERR(device);
+ goto errout;
+ }
devices[i] = device;
cards++;
}
devices[i] = device;
cards++;
}
@@
-1005,10
+1004,14
@@
static int __init alsa_card_serial_init(void)
#ifdef MODULE
printk(KERN_ERR "serial midi soundcard not found or device busy\n");
#endif
#ifdef MODULE
printk(KERN_ERR "serial midi soundcard not found or device busy\n");
#endif
-
snd_serial_unregister_all()
;
-
return -ENODEV
;
+
err = -ENODEV
;
+
goto errout
;
}
return 0;
}
return 0;
+
+ errout:
+ snd_serial_unregister_all();
+ return err;
}
static void __exit alsa_card_serial_exit(void)
}
static void __exit alsa_card_serial_exit(void)