[ALSA] Fix check of enable module option
[pandora-kernel.git] / sound / isa / gus / gusclassic.c
index 91c2191..26dccfe 100644 (file)
@@ -247,8 +247,10 @@ static int __init alsa_card_gusclassic_init(void)
                return err;
 
        cards = 0;
-       for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+       for (i = 0; i < SNDRV_CARDS; i++) {
                struct platform_device *device;
+               if (! enable[i])
+                       continue;
                device = platform_device_register_simple(GUSCLASSIC_DRIVER,
                                                         i, NULL, 0);
                if (IS_ERR(device)) {