diff options
Diffstat (limited to 'sound/isa/cs423x')
-rw-r--r-- | sound/isa/cs423x/cs4231.c | 14 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 14 |
2 files changed, 8 insertions, 20 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) |
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 382bb17ef49f..b07a62b76175 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -780,10 +780,8 @@ static int __init alsa_card_cs423x_init(void) | |||
780 | continue; | 780 | continue; |
781 | device = platform_device_register_simple(CS423X_DRIVER, | 781 | device = platform_device_register_simple(CS423X_DRIVER, |
782 | i, NULL, 0); | 782 | i, NULL, 0); |
783 | if (IS_ERR(device)) { | 783 | if (IS_ERR(device)) |
784 | err = PTR_ERR(device); | 784 | continue; |
785 | goto errout; | ||
786 | } | ||
787 | platform_devices[i] = device; | 785 | platform_devices[i] = device; |
788 | snd_cs423x_devices++; | 786 | snd_cs423x_devices++; |
789 | } | 787 | } |
@@ -802,14 +800,10 @@ static int __init alsa_card_cs423x_init(void) | |||
802 | #ifdef MODULE | 800 | #ifdef MODULE |
803 | printk(KERN_ERR IDENT " soundcard not found or device busy\n"); | 801 | printk(KERN_ERR IDENT " soundcard not found or device busy\n"); |
804 | #endif | 802 | #endif |
805 | err = -ENODEV; | 803 | snd_cs423x_unregister_all(); |
806 | goto errout; | 804 | return -ENODEV; |
807 | } | 805 | } |
808 | return 0; | 806 | return 0; |
809 | |||
810 | errout: | ||
811 | snd_cs423x_unregister_all(); | ||
812 | return err; | ||
813 | } | 807 | } |
814 | 808 | ||
815 | static void __exit alsa_card_cs423x_exit(void) | 809 | static void __exit alsa_card_cs423x_exit(void) |