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