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/cs423x/cs4231.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/cs423x/cs4231.c')
-rw-r--r-- | sound/isa/cs423x/cs4231.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c index a30dcd962525..073dac975679 100644 --- a/sound/isa/cs423x/cs4231.c +++ b/sound/isa/cs423x/cs4231.c | |||
@@ -209,10 +209,8 @@ static int __init alsa_card_cs4231_init(void) | |||
209 | continue; | 209 | continue; |
210 | device = platform_device_register_simple(SND_CS4231_DRIVER, | 210 | device = platform_device_register_simple(SND_CS4231_DRIVER, |
211 | i, NULL, 0); | 211 | i, NULL, 0); |
212 | if (IS_ERR(device)) { | 212 | if (IS_ERR(device)) |
213 | err = PTR_ERR(device); | 213 | continue; |
214 | goto errout; | ||
215 | } | ||
216 | devices[i] = device; | 214 | devices[i] = device; |
217 | cards++; | 215 | cards++; |
218 | } | 216 | } |
@@ -220,14 +218,10 @@ static int __init alsa_card_cs4231_init(void) | |||
220 | #ifdef MODULE | 218 | #ifdef MODULE |
221 | printk(KERN_ERR "CS4231 soundcard not found or device busy\n"); | 219 | printk(KERN_ERR "CS4231 soundcard not found or device busy\n"); |
222 | #endif | 220 | #endif |
223 | err = -ENODEV; | 221 | snd_cs4231_unregister_all(); |
224 | goto errout; | 222 | return -ENODEV; |
225 | } | 223 | } |
226 | return 0; | 224 | return 0; |
227 | |||
228 | errout: | ||
229 | snd_cs4231_unregister_all(); | ||
230 | return err; | ||
231 | } | 225 | } |
232 | 226 | ||
233 | static void __exit alsa_card_cs4231_exit(void) | 227 | static void __exit alsa_card_cs4231_exit(void) |