aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/serial-u16550.c
diff options
context:
space:
mode:
authorRene Herman <rene.herman@keyaccess.nl>2006-04-13 06:57:11 -0400
committerJaroslav Kysela <perex@suse.cz>2006-04-27 15:10:08 -0400
commita182ee9876c7826d0b8f7789cb5c38c5bfbec441 (patch)
tree68862b25d3e70a8c294ec248d3473e30fb2aae94 /sound/drivers/serial-u16550.c
parent5c59e09d7e51f5781439aa6f1963076568fd1f4f (diff)
[ALSA] continue on IS_ERR from platform device registration
I previously only concerned myself with sound/isa. When I now checked for more platform_device_register_simple() usages in ALSA I found a couple more drivers that needed the same patches as already submitted for all the ISA drivers. This first one is the continue-on-iserr patch for sound/drivers. This gets them all. Signed-off-by: Rene Herman <rene.herman@keyaccess.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/serial-u16550.c')
-rw-r--r--sound/drivers/serial-u16550.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 1a7fbefe4740..c01b4c5118b9 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -996,10 +996,8 @@ static int __init alsa_card_serial_init(void)
996 continue; 996 continue;
997 device = platform_device_register_simple(SND_SERIAL_DRIVER, 997 device = platform_device_register_simple(SND_SERIAL_DRIVER,
998 i, NULL, 0); 998 i, NULL, 0);
999 if (IS_ERR(device)) { 999 if (IS_ERR(device))
1000 err = PTR_ERR(device); 1000 continue;
1001 goto errout;
1002 }
1003 devices[i] = device; 1001 devices[i] = device;
1004 cards++; 1002 cards++;
1005 } 1003 }
@@ -1007,14 +1005,10 @@ static int __init alsa_card_serial_init(void)
1007#ifdef MODULE 1005#ifdef MODULE
1008 printk(KERN_ERR "serial midi soundcard not found or device busy\n"); 1006 printk(KERN_ERR "serial midi soundcard not found or device busy\n");
1009#endif 1007#endif
1010 err = -ENODEV; 1008 snd_serial_unregister_all();
1011 goto errout; 1009 return -ENODEV;
1012 } 1010 }
1013 return 0; 1011 return 0;
1014
1015 errout:
1016 snd_serial_unregister_all();
1017 return err;
1018} 1012}
1019 1013
1020static void __exit alsa_card_serial_exit(void) 1014static void __exit alsa_card_serial_exit(void)