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/opl3sa2.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/opl3sa2.c')
-rw-r--r-- | sound/isa/opl3sa2.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index c906e205d7d5..02ae73ea0bad 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -962,10 +962,8 @@ static int __init alsa_card_opl3sa2_init(void) | |||
962 | #endif | 962 | #endif |
963 | device = platform_device_register_simple(OPL3SA2_DRIVER, | 963 | device = platform_device_register_simple(OPL3SA2_DRIVER, |
964 | i, NULL, 0); | 964 | i, NULL, 0); |
965 | if (IS_ERR(device)) { | 965 | if (IS_ERR(device)) |
966 | err = PTR_ERR(device); | 966 | continue; |
967 | goto errout; | ||
968 | } | ||
969 | platform_devices[i] = device; | 967 | platform_devices[i] = device; |
970 | snd_opl3sa2_devices++; | 968 | snd_opl3sa2_devices++; |
971 | } | 969 | } |
@@ -983,14 +981,10 @@ static int __init alsa_card_opl3sa2_init(void) | |||
983 | #ifdef MODULE | 981 | #ifdef MODULE |
984 | snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n"); | 982 | snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n"); |
985 | #endif | 983 | #endif |
986 | err = -ENODEV; | 984 | snd_opl3sa2_unregister_all(); |
987 | goto errout; | 985 | return -ENODEV; |
988 | } | 986 | } |
989 | return 0; | 987 | return 0; |
990 | |||
991 | errout: | ||
992 | snd_opl3sa2_unregister_all(); | ||
993 | return err; | ||
994 | } | 988 | } |
995 | 989 | ||
996 | static void __exit alsa_card_opl3sa2_exit(void) | 990 | static void __exit alsa_card_opl3sa2_exit(void) |