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/cmi8330.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/cmi8330.c')
-rw-r--r-- | sound/isa/cmi8330.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index bc0f5ebf5d3c..35780b811d16 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -699,10 +699,8 @@ static int __init alsa_card_cmi8330_init(void) | |||
699 | continue; | 699 | continue; |
700 | device = platform_device_register_simple(CMI8330_DRIVER, | 700 | device = platform_device_register_simple(CMI8330_DRIVER, |
701 | i, NULL, 0); | 701 | i, NULL, 0); |
702 | if (IS_ERR(device)) { | 702 | if (IS_ERR(device)) |
703 | err = PTR_ERR(device); | 703 | continue; |
704 | goto errout; | ||
705 | } | ||
706 | platform_devices[i] = device; | 704 | platform_devices[i] = device; |
707 | cards++; | 705 | cards++; |
708 | } | 706 | } |
@@ -719,14 +717,10 @@ static int __init alsa_card_cmi8330_init(void) | |||
719 | #ifdef MODULE | 717 | #ifdef MODULE |
720 | snd_printk(KERN_ERR "CMI8330 not found or device busy\n"); | 718 | snd_printk(KERN_ERR "CMI8330 not found or device busy\n"); |
721 | #endif | 719 | #endif |
722 | err = -ENODEV; | 720 | snd_cmi8330_unregister_all(); |
723 | goto errout; | 721 | return -ENODEV; |
724 | } | 722 | } |
725 | return 0; | 723 | return 0; |
726 | |||
727 | errout: | ||
728 | snd_cmi8330_unregister_all(); | ||
729 | return err; | ||
730 | } | 724 | } |
731 | 725 | ||
732 | static void __exit alsa_card_cmi8330_exit(void) | 726 | static void __exit alsa_card_cmi8330_exit(void) |