aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/wavefront/wavefront.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/wavefront/wavefront.c')
-rw-r--r--sound/isa/wavefront/wavefront.c14
1 files changed, 4 insertions, 10 deletions
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)