diff options
Diffstat (limited to 'sound/drivers/virmidi.c')
-rw-r--r-- | sound/drivers/virmidi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index 4258723de2ab..a3ee306239c9 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c @@ -163,8 +163,10 @@ static int __init alsa_card_virmidi_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(SND_VIRMIDI_DRIVER, i, NULL, 0); if (IS_ERR(device)) { |