[ALSA] Fix check of enable module option
[pandora-kernel.git] / sound / isa / gus / gusclassic.c
index d1165b9..26dccfe 100644 (file)
@@ -195,7 +195,7 @@ static int __init snd_gusclassic_probe(struct platform_device *pdev)
                        goto _err;
        }
        sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %d, dma %d", gus->gf1.port, xirq, xdma1);
-       if (dma2 >= 0)
+       if (xdma2 >= 0)
                sprintf(card->longname + strlen(card->longname), "&%d", xdma2);
 
        snd_card_set_dev(card, &pdev->dev);
@@ -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)) {