diff options
author | Rene Herman <rene.herman@keyaccess.nl> | 2006-04-11 08:08:33 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-04-12 05:55:30 -0400 |
commit | d0ac642d76c79c5cc673c4cdfe43e926379784e1 (patch) | |
tree | 676e529b860634706ff98978d0328a71e584bc4f /sound/isa/sgalaxy.c | |
parent | 12831c15f35dcc9f55fa63d50fd4892c7c6a0a1c (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/sgalaxy.c')
-rw-r--r-- | sound/isa/sgalaxy.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c index a60e66afbf90..f01a80a97ab8 100644 --- a/sound/isa/sgalaxy.c +++ b/sound/isa/sgalaxy.c | |||
@@ -366,10 +366,8 @@ static int __init alsa_card_sgalaxy_init(void) | |||
366 | continue; | 366 | continue; |
367 | device = platform_device_register_simple(SND_SGALAXY_DRIVER, | 367 | device = platform_device_register_simple(SND_SGALAXY_DRIVER, |
368 | i, NULL, 0); | 368 | i, NULL, 0); |
369 | if (IS_ERR(device)) { | 369 | if (IS_ERR(device)) |
370 | err = PTR_ERR(device); | 370 | continue; |
371 | goto errout; | ||
372 | } | ||
373 | devices[i] = device; | 371 | devices[i] = device; |
374 | cards++; | 372 | cards++; |
375 | } | 373 | } |
@@ -377,14 +375,10 @@ static int __init alsa_card_sgalaxy_init(void) | |||
377 | #ifdef MODULE | 375 | #ifdef MODULE |
378 | snd_printk(KERN_ERR "Sound Galaxy soundcard not found or device busy\n"); | 376 | snd_printk(KERN_ERR "Sound Galaxy soundcard not found or device busy\n"); |
379 | #endif | 377 | #endif |
380 | err = -ENODEV; | 378 | snd_sgalaxy_unregister_all(); |
381 | goto errout; | 379 | return -ENODEV; |
382 | } | 380 | } |
383 | return 0; | 381 | return 0; |
384 | |||
385 | errout: | ||
386 | snd_sgalaxy_unregister_all(); | ||
387 | return err; | ||
388 | } | 382 | } |
389 | 383 | ||
390 | static void __exit alsa_card_sgalaxy_exit(void) | 384 | static void __exit alsa_card_sgalaxy_exit(void) |