git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
sound
/
isa
/
gus
/
gusclassic.c
diff --git
a/sound/isa/gus/gusclassic.c
b/sound/isa/gus/gusclassic.c
index
91c2191
..
37057a3
100644
(file)
--- a/
sound/isa/gus/gusclassic.c
+++ b/
sound/isa/gus/gusclassic.c
@@
-247,13
+247,17
@@
static int __init alsa_card_gusclassic_init(void)
return err;
cards = 0;
return err;
cards = 0;
- for (i = 0; i < SNDRV_CARDS
&& enable[i]
; i++) {
+ for (i = 0; i < SNDRV_CARDS; i++) {
struct platform_device *device;
struct platform_device *device;
+ if (! enable[i])
+ continue;
device = platform_device_register_simple(GUSCLASSIC_DRIVER,
i, NULL, 0);
device = platform_device_register_simple(GUSCLASSIC_DRIVER,
i, NULL, 0);
- if (IS_ERR(device)) {
- err = PTR_ERR(device);
- goto errout;
+ if (IS_ERR(device))
+ continue;
+ if (!platform_get_drvdata(device)) {
+ platform_device_unregister(device);
+ continue;
}
devices[i] = device;
cards++;
}
devices[i] = device;
cards++;
@@
-262,14
+266,10
@@
static int __init alsa_card_gusclassic_init(void)
#ifdef MODULE
printk(KERN_ERR "GUS Classic soundcard not found or device busy\n");
#endif
#ifdef MODULE
printk(KERN_ERR "GUS Classic soundcard not found or device busy\n");
#endif
-
err = -ENODEV
;
-
goto errout
;
+
snd_gusclassic_unregister_all()
;
+
return -ENODEV
;
}
return 0;
}
return 0;
-
- errout:
- snd_gusclassic_unregister_all();
- return err;
}
static void __exit alsa_card_gusclassic_exit(void)
}
static void __exit alsa_card_gusclassic_exit(void)