diff options
Diffstat (limited to 'sound/isa/es18xx.c')
-rw-r--r-- | sound/isa/es18xx.c | 14 |
1 files changed, 4 insertions, 10 deletions
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 | ||
2424 | static void __exit alsa_card_es18xx_exit(void) | 2418 | static void __exit alsa_card_es18xx_exit(void) |