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