aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/ad1848/ad1848.c14
-rw-r--r--sound/isa/cmi8330.c14
-rw-r--r--sound/isa/cs423x/cs4231.c14
-rw-r--r--sound/isa/cs423x/cs4236.c14
-rw-r--r--sound/isa/es1688/es1688.c14
-rw-r--r--sound/isa/es18xx.c14
-rw-r--r--sound/isa/gus/gusclassic.c14
-rw-r--r--sound/isa/gus/gusextreme.c14
-rw-r--r--sound/isa/gus/gusmax.c14
-rw-r--r--sound/isa/gus/interwave.c14
-rw-r--r--sound/isa/opl3sa2.c14
-rw-r--r--sound/isa/sb/sb16.c14
-rw-r--r--sound/isa/sb/sb8.c14
-rw-r--r--sound/isa/sgalaxy.c14
-rw-r--r--sound/isa/sscape.c14
-rw-r--r--sound/isa/wavefront/wavefront.c14
16 files changed, 64 insertions, 160 deletions
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index 326a057f752f..1f460eb402a3 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -193,10 +193,8 @@ static int __init alsa_card_ad1848_init(void)
193 continue; 193 continue;
194 device = platform_device_register_simple(SND_AD1848_DRIVER, 194 device = platform_device_register_simple(SND_AD1848_DRIVER,
195 i, NULL, 0); 195 i, NULL, 0);
196 if (IS_ERR(device)) { 196 if (IS_ERR(device))
197 err = PTR_ERR(device); 197 continue;
198 goto errout;
199 }
200 devices[i] = device; 198 devices[i] = device;
201 cards++; 199 cards++;
202 } 200 }
@@ -204,14 +202,10 @@ static int __init alsa_card_ad1848_init(void)
204#ifdef MODULE 202#ifdef MODULE
205 printk(KERN_ERR "AD1848 soundcard not found or device busy\n"); 203 printk(KERN_ERR "AD1848 soundcard not found or device busy\n");
206#endif 204#endif
207 err = -ENODEV; 205 snd_ad1848_unregister_all();
208 goto errout; 206 return -ENODEV;
209 } 207 }
210 return 0; 208 return 0;
211
212 errout:
213 snd_ad1848_unregister_all();
214 return err;
215} 209}
216 210
217static void __exit alsa_card_ad1848_exit(void) 211static void __exit alsa_card_ad1848_exit(void)
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
732static void __exit alsa_card_cmi8330_exit(void) 726static void __exit alsa_card_cmi8330_exit(void)
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
233static void __exit alsa_card_cs4231_exit(void) 227static 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
815static void __exit alsa_card_cs423x_exit(void) 809static void __exit alsa_card_cs423x_exit(void)
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 2b69fc829265..d83d7104958f 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -213,10 +213,8 @@ static int __init alsa_card_es1688_init(void)
213 continue; 213 continue;
214 device = platform_device_register_simple(ES1688_DRIVER, 214 device = platform_device_register_simple(ES1688_DRIVER,
215 i, NULL, 0); 215 i, NULL, 0);
216 if (IS_ERR(device)) { 216 if (IS_ERR(device))
217 err = PTR_ERR(device); 217 continue;
218 goto errout;
219 }
220 devices[i] = device; 218 devices[i] = device;
221 cards++; 219 cards++;
222 } 220 }
@@ -224,14 +222,10 @@ static int __init alsa_card_es1688_init(void)
224#ifdef MODULE 222#ifdef MODULE
225 printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n"); 223 printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n");
226#endif 224#endif
227 err = -ENODEV; 225 snd_es1688_unregister_all();
228 goto errout; 226 return -ENODEV;
229 } 227 }
230 return 0; 228 return 0;
231
232 errout:
233 snd_es1688_unregister_all();
234 return err;
235} 229}
236 230
237static void __exit alsa_card_es1688_exit(void) 231static void __exit alsa_card_es1688_exit(void)
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 9fbc185b4cc2..0da249bcf02b 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -2391,10 +2391,8 @@ static int __init alsa_card_es18xx_init(void)
2391 continue; 2391 continue;
2392 device = platform_device_register_simple(ES18XX_DRIVER, 2392 device = platform_device_register_simple(ES18XX_DRIVER,
2393 i, NULL, 0); 2393 i, NULL, 0);
2394 if (IS_ERR(device)) { 2394 if (IS_ERR(device))
2395 err = PTR_ERR(device); 2395 continue;
2396 goto errout;
2397 }
2398 platform_devices[i] = device; 2396 platform_devices[i] = device;
2399 cards++; 2397 cards++;
2400 } 2398 }
@@ -2411,14 +2409,10 @@ static int __init alsa_card_es18xx_init(void)
2411#ifdef MODULE 2409#ifdef MODULE
2412 snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n"); 2410 snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n");
2413#endif 2411#endif
2414 err = -ENODEV; 2412 snd_es18xx_unregister_all();
2415 goto errout; 2413 return -ENODEV;
2416 } 2414 }
2417 return 0; 2415 return 0;
2418
2419 errout:
2420 snd_es18xx_unregister_all();
2421 return err;
2422} 2416}
2423 2417
2424static void __exit alsa_card_es18xx_exit(void) 2418static void __exit alsa_card_es18xx_exit(void)
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 26dccfea2437..ed34427c49db 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -253,10 +253,8 @@ static int __init alsa_card_gusclassic_init(void)
253 continue; 253 continue;
254 device = platform_device_register_simple(GUSCLASSIC_DRIVER, 254 device = platform_device_register_simple(GUSCLASSIC_DRIVER,
255 i, NULL, 0); 255 i, NULL, 0);
256 if (IS_ERR(device)) { 256 if (IS_ERR(device))
257 err = PTR_ERR(device); 257 continue;
258 goto errout;
259 }
260 devices[i] = device; 258 devices[i] = device;
261 cards++; 259 cards++;
262 } 260 }
@@ -264,14 +262,10 @@ static int __init alsa_card_gusclassic_init(void)
264#ifdef MODULE 262#ifdef MODULE
265 printk(KERN_ERR "GUS Classic soundcard not found or device busy\n"); 263 printk(KERN_ERR "GUS Classic soundcard not found or device busy\n");
266#endif 264#endif
267 err = -ENODEV; 265 snd_gusclassic_unregister_all();
268 goto errout; 266 return -ENODEV;
269 } 267 }
270 return 0; 268 return 0;
271
272 errout:
273 snd_gusclassic_unregister_all();
274 return err;
275} 269}
276 270
277static void __exit alsa_card_gusclassic_exit(void) 271static void __exit alsa_card_gusclassic_exit(void)
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index 31dc20501d0c..aa312dee99c8 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -363,10 +363,8 @@ static int __init alsa_card_gusextreme_init(void)
363 continue; 363 continue;
364 device = platform_device_register_simple(GUSEXTREME_DRIVER, 364 device = platform_device_register_simple(GUSEXTREME_DRIVER,
365 i, NULL, 0); 365 i, NULL, 0);
366 if (IS_ERR(device)) { 366 if (IS_ERR(device))
367 err = PTR_ERR(device); 367 continue;
368 goto errout;
369 }
370 devices[i] = device; 368 devices[i] = device;
371 cards++; 369 cards++;
372 } 370 }
@@ -374,14 +372,10 @@ static int __init alsa_card_gusextreme_init(void)
374#ifdef MODULE 372#ifdef MODULE
375 printk(KERN_ERR "GUS Extreme soundcard not found or device busy\n"); 373 printk(KERN_ERR "GUS Extreme soundcard not found or device busy\n");
376#endif 374#endif
377 err = -ENODEV; 375 snd_gusextreme_unregister_all();
378 goto errout; 376 return -ENODEV;
379 } 377 }
380 return 0; 378 return 0;
381
382 errout:
383 snd_gusextreme_unregister_all();
384 return err;
385} 379}
386 380
387static void __exit alsa_card_gusextreme_exit(void) 381static void __exit alsa_card_gusextreme_exit(void)
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index cafb9b67fa72..a733fabf653a 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -390,10 +390,8 @@ static int __init alsa_card_gusmax_init(void)
390 continue; 390 continue;
391 device = platform_device_register_simple(GUSMAX_DRIVER, 391 device = platform_device_register_simple(GUSMAX_DRIVER,
392 i, NULL, 0); 392 i, NULL, 0);
393 if (IS_ERR(device)) { 393 if (IS_ERR(device))
394 err = PTR_ERR(device); 394 continue;
395 goto errout;
396 }
397 devices[i] = device; 395 devices[i] = device;
398 cards++; 396 cards++;
399 } 397 }
@@ -401,14 +399,10 @@ static int __init alsa_card_gusmax_init(void)
401#ifdef MODULE 399#ifdef MODULE
402 printk(KERN_ERR "GUS MAX soundcard not found or device busy\n"); 400 printk(KERN_ERR "GUS MAX soundcard not found or device busy\n");
403#endif 401#endif
404 err = -ENODEV; 402 snd_gusmax_unregister_all();
405 goto errout; 403 return -ENODEV;
406 } 404 }
407 return 0; 405 return 0;
408
409 errout:
410 snd_gusmax_unregister_all();
411 return err;
412} 406}
413 407
414static void __exit alsa_card_gusmax_exit(void) 408static void __exit alsa_card_gusmax_exit(void)
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index de71b7a99c83..4be472ea99d2 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -947,10 +947,8 @@ static int __init alsa_card_interwave_init(void)
947#endif 947#endif
948 device = platform_device_register_simple(INTERWAVE_DRIVER, 948 device = platform_device_register_simple(INTERWAVE_DRIVER,
949 i, NULL, 0); 949 i, NULL, 0);
950 if (IS_ERR(device)) { 950 if (IS_ERR(device))
951 err = PTR_ERR(device); 951 continue;
952 goto errout;
953 }
954 platform_devices[i] = device; 952 platform_devices[i] = device;
955 cards++; 953 cards++;
956 } 954 }
@@ -966,14 +964,10 @@ static int __init alsa_card_interwave_init(void)
966#ifdef MODULE 964#ifdef MODULE
967 printk(KERN_ERR "InterWave soundcard not found or device busy\n"); 965 printk(KERN_ERR "InterWave soundcard not found or device busy\n");
968#endif 966#endif
969 err = -ENODEV; 967 snd_interwave_unregister_all();
970 goto errout; 968 return -ENODEV;
971 } 969 }
972 return 0; 970 return 0;
973
974 errout:
975 snd_interwave_unregister_all();
976 return err;
977} 971}
978 972
979static void __exit alsa_card_interwave_exit(void) 973static void __exit alsa_card_interwave_exit(void)
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
996static void __exit alsa_card_opl3sa2_exit(void) 990static void __exit alsa_card_opl3sa2_exit(void)
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 21ea65925a9e..24fa190f33ac 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -720,10 +720,8 @@ static int __init alsa_card_sb16_init(void)
720 continue; 720 continue;
721 device = platform_device_register_simple(SND_SB16_DRIVER, 721 device = platform_device_register_simple(SND_SB16_DRIVER,
722 i, NULL, 0); 722 i, NULL, 0);
723 if (IS_ERR(device)) { 723 if (IS_ERR(device))
724 err = PTR_ERR(device); 724 continue;
725 goto errout;
726 }
727 platform_devices[i] = device; 725 platform_devices[i] = device;
728 cards++; 726 cards++;
729 } 727 }
@@ -745,14 +743,10 @@ static int __init alsa_card_sb16_init(void)
745 snd_printk(KERN_ERR "In case, if you have AWE card, try snd-sbawe module\n"); 743 snd_printk(KERN_ERR "In case, if you have AWE card, try snd-sbawe module\n");
746#endif 744#endif
747#endif 745#endif
748 err = -ENODEV; 746 snd_sb16_unregister_all();
749 goto errout; 747 return -ENODEV;
750 } 748 }
751 return 0; 749 return 0;
752
753 errout:
754 snd_sb16_unregister_all();
755 return err;
756} 750}
757 751
758static void __exit alsa_card_sb16_exit(void) 752static void __exit alsa_card_sb16_exit(void)
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 3efa23d303c3..f75eeb05c1fa 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -264,10 +264,8 @@ static int __init alsa_card_sb8_init(void)
264 continue; 264 continue;
265 device = platform_device_register_simple(SND_SB8_DRIVER, 265 device = platform_device_register_simple(SND_SB8_DRIVER,
266 i, NULL, 0); 266 i, NULL, 0);
267 if (IS_ERR(device)) { 267 if (IS_ERR(device))
268 err = PTR_ERR(device); 268 continue;
269 goto errout;
270 }
271 devices[i] = device; 269 devices[i] = device;
272 cards++; 270 cards++;
273 } 271 }
@@ -275,14 +273,10 @@ static int __init alsa_card_sb8_init(void)
275#ifdef MODULE 273#ifdef MODULE
276 snd_printk(KERN_ERR "Sound Blaster soundcard not found or device busy\n"); 274 snd_printk(KERN_ERR "Sound Blaster soundcard not found or device busy\n");
277#endif 275#endif
278 err = -ENODEV; 276 snd_sb8_unregister_all();
279 goto errout; 277 return -ENODEV;
280 } 278 }
281 return 0; 279 return 0;
282
283 errout:
284 snd_sb8_unregister_all();
285 return err;
286} 280}
287 281
288static void __exit alsa_card_sb8_exit(void) 282static void __exit alsa_card_sb8_exit(void)
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
390static void __exit alsa_card_sgalaxy_exit(void) 384static void __exit alsa_card_sgalaxy_exit(void)
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 48e5552d3444..532f6e0eff0b 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -1427,8 +1427,8 @@ static int __init sscape_manual_probe(void)
1427 dma[i] == SNDRV_AUTO_DMA) { 1427 dma[i] == SNDRV_AUTO_DMA) {
1428 printk(KERN_INFO 1428 printk(KERN_INFO
1429 "sscape: insufficient parameters, need IO, IRQ, MPU-IRQ and DMA\n"); 1429 "sscape: insufficient parameters, need IO, IRQ, MPU-IRQ and DMA\n");
1430 ret = -ENXIO; 1430 sscape_unregister_all();
1431 goto errout; 1431 return -ENXIO;
1432 } 1432 }
1433 1433
1434 /* 1434 /*
@@ -1436,17 +1436,11 @@ static int __init sscape_manual_probe(void)
1436 */ 1436 */
1437 device = platform_device_register_simple(SSCAPE_DRIVER, 1437 device = platform_device_register_simple(SSCAPE_DRIVER,
1438 i, NULL, 0); 1438 i, NULL, 0);
1439 if (IS_ERR(device)) { 1439 if (IS_ERR(device))
1440 ret = PTR_ERR(device); 1440 continue;
1441 goto errout;
1442 }
1443 platform_devices[i] = device; 1441 platform_devices[i] = device;
1444 } 1442 }
1445 return 0; 1443 return 0;
1446
1447 errout:
1448 sscape_unregister_all();
1449 return ret;
1450} 1444}
1451 1445
1452static void sscape_exit(void) 1446static void sscape_exit(void)
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index 2f13cd5d4dcb..ed9d0173e80f 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -722,10 +722,8 @@ static int __init alsa_card_wavefront_init(void)
722#endif 722#endif
723 device = platform_device_register_simple(WAVEFRONT_DRIVER, 723 device = platform_device_register_simple(WAVEFRONT_DRIVER,
724 i, NULL, 0); 724 i, NULL, 0);
725 if (IS_ERR(device)) { 725 if (IS_ERR(device))
726 err = PTR_ERR(device); 726 continue;
727 goto errout;
728 }
729 platform_devices[i] = device; 727 platform_devices[i] = device;
730 cards++; 728 cards++;
731 } 729 }
@@ -742,14 +740,10 @@ static int __init alsa_card_wavefront_init(void)
742#ifdef MODULE 740#ifdef MODULE
743 printk (KERN_ERR "No WaveFront cards found or devices busy\n"); 741 printk (KERN_ERR "No WaveFront cards found or devices busy\n");
744#endif 742#endif
745 err = -ENODEV; 743 snd_wavefront_unregister_all();
746 goto errout; 744 return -ENODEV;
747 } 745 }
748 return 0; 746 return 0;
749
750 errout:
751 snd_wavefront_unregister_all();
752 return err;
753} 747}
754 748
755static void __exit alsa_card_wavefront_exit(void) 749static void __exit alsa_card_wavefront_exit(void)