aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/cmi8330.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/cmi8330.c')
-rw-r--r--sound/isa/cmi8330.c14
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
732static void __exit alsa_card_cmi8330_exit(void) 726static void __exit alsa_card_cmi8330_exit(void)