aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/ad1848/ad1848.c
diff options
context:
space:
mode:
authorRene Herman <rene.herman@keyaccess.nl>2006-04-11 08:08:33 -0400
committerJaroslav Kysela <perex@suse.cz>2006-04-12 05:55:30 -0400
commitd0ac642d76c79c5cc673c4cdfe43e926379784e1 (patch)
tree676e529b860634706ff98978d0328a71e584bc4f /sound/isa/ad1848/ad1848.c
parent12831c15f35dcc9f55fa63d50fd4892c7c6a0a1c (diff)
[ALSA] continue on IS_ERR from platform device registration
Continue with the next one on error from device registration. This would seem the correct thing to do, even if it's not the probe() error that we're getting. Signed-off-by: Rene Herman <rene.herman@keyaccess.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/ad1848/ad1848.c')
-rw-r--r--sound/isa/ad1848/ad1848.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index 326a057f752f..1f460eb402a3 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -193,10 +193,8 @@ static int __init alsa_card_ad1848_init(void)
193 continue; 193 continue;
194 device = platform_device_register_simple(SND_AD1848_DRIVER, 194 device = platform_device_register_simple(SND_AD1848_DRIVER,
195 i, NULL, 0); 195 i, NULL, 0);
196 if (IS_ERR(device)) { 196 if (IS_ERR(device))
197 err = PTR_ERR(device); 197 continue;
198 goto errout;
199 }
200 devices[i] = device; 198 devices[i] = device;
201 cards++; 199 cards++;
202 } 200 }
@@ -204,14 +202,10 @@ static int __init alsa_card_ad1848_init(void)
204#ifdef MODULE 202#ifdef MODULE
205 printk(KERN_ERR "AD1848 soundcard not found or device busy\n"); 203 printk(KERN_ERR "AD1848 soundcard not found or device busy\n");
206#endif 204#endif
207 err = -ENODEV; 205 snd_ad1848_unregister_all();
208 goto errout; 206 return -ENODEV;
209 } 207 }
210 return 0; 208 return 0;
211
212 errout:
213 snd_ad1848_unregister_all();
214 return err;
215} 209}
216 210
217static void __exit alsa_card_ad1848_exit(void) 211static void __exit alsa_card_ad1848_exit(void)