diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-18 04:54:00 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-18 04:54:00 -0400 |
| commit | 4741c336d27dec3ea68a35659abb8dc82b142388 (patch) | |
| tree | a8576df82129354b77b0144c480c446ec7aba7b2 /sound/isa/gus/interwave.c | |
| parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) | |
| parent | a9a5cd5d2a57fb76dbae2115450f777b69beccf7 (diff) | |
Merge branch 'master'
Diffstat (limited to 'sound/isa/gus/interwave.c')
| -rw-r--r-- | sound/isa/gus/interwave.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index de71b7a99c83..4298d339e786 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
| @@ -947,9 +947,11 @@ 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; | 952 | if (!platform_get_drvdata(device)) { |
| 953 | platform_device_unregister(device); | ||
| 954 | continue; | ||
| 953 | } | 955 | } |
| 954 | platform_devices[i] = device; | 956 | platform_devices[i] = device; |
| 955 | cards++; | 957 | cards++; |
| @@ -966,14 +968,10 @@ static int __init alsa_card_interwave_init(void) | |||
| 966 | #ifdef MODULE | 968 | #ifdef MODULE |
| 967 | printk(KERN_ERR "InterWave soundcard not found or device busy\n"); | 969 | printk(KERN_ERR "InterWave soundcard not found or device busy\n"); |
| 968 | #endif | 970 | #endif |
| 969 | err = -ENODEV; | 971 | snd_interwave_unregister_all(); |
| 970 | goto errout; | 972 | return -ENODEV; |
| 971 | } | 973 | } |
| 972 | return 0; | 974 | return 0; |
| 973 | |||
| 974 | errout: | ||
| 975 | snd_interwave_unregister_all(); | ||
| 976 | return err; | ||
| 977 | } | 975 | } |
| 978 | 976 | ||
| 979 | static void __exit alsa_card_interwave_exit(void) | 977 | static void __exit alsa_card_interwave_exit(void) |
