diff options
Diffstat (limited to 'sound/isa/gus/interwave.c')
-rw-r--r-- | sound/isa/gus/interwave.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index de71b7a99c83..4be472ea99d2 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -947,10 +947,8 @@ static int __init alsa_card_interwave_init(void) | |||
947 | #endif | 947 | #endif |
948 | device = platform_device_register_simple(INTERWAVE_DRIVER, | 948 | device = platform_device_register_simple(INTERWAVE_DRIVER, |
949 | i, NULL, 0); | 949 | i, NULL, 0); |
950 | if (IS_ERR(device)) { | 950 | if (IS_ERR(device)) |
951 | err = PTR_ERR(device); | 951 | continue; |
952 | goto errout; | ||
953 | } | ||
954 | platform_devices[i] = device; | 952 | platform_devices[i] = device; |
955 | cards++; | 953 | cards++; |
956 | } | 954 | } |
@@ -966,14 +964,10 @@ static int __init alsa_card_interwave_init(void) | |||
966 | #ifdef MODULE | 964 | #ifdef MODULE |
967 | printk(KERN_ERR "InterWave soundcard not found or device busy\n"); | 965 | printk(KERN_ERR "InterWave soundcard not found or device busy\n"); |
968 | #endif | 966 | #endif |
969 | err = -ENODEV; | 967 | snd_interwave_unregister_all(); |
970 | goto errout; | 968 | return -ENODEV; |
971 | } | 969 | } |
972 | return 0; | 970 | return 0; |
973 | |||
974 | errout: | ||
975 | snd_interwave_unregister_all(); | ||
976 | return err; | ||
977 | } | 971 | } |
978 | 972 | ||
979 | static void __exit alsa_card_interwave_exit(void) | 973 | static void __exit alsa_card_interwave_exit(void) |