diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-02-20 05:57:34 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:30:43 -0500 |
commit | 8278ca8feb2748cf02d756ac6c5b9ab2e047c84a (patch) | |
tree | a58ddfa8d7ac897c02e4ba3bda9b77e278348fbf /sound/drivers/virmidi.c | |
parent | 1a56f8d662ec7fc86f2c408d289fa07cdb781746 (diff) |
[ALSA] Fix check of enable module option
Fix the check of enable module option in probe of platform_device drivers.
It shouldn't break the loop but just ignore if enable[i] is false.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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) | |||
163 | return err; | 163 | return err; |
164 | 164 | ||
165 | cards = 0; | 165 | cards = 0; |
166 | for (i = 0; i < SNDRV_CARDS && enable[i]; i++) { | 166 | for (i = 0; i < SNDRV_CARDS; i++) { |
167 | struct platform_device *device; | 167 | struct platform_device *device; |
168 | if (! enable[i]) | ||
169 | continue; | ||
168 | device = platform_device_register_simple(SND_VIRMIDI_DRIVER, | 170 | device = platform_device_register_simple(SND_VIRMIDI_DRIVER, |
169 | i, NULL, 0); | 171 | i, NULL, 0); |
170 | if (IS_ERR(device)) { | 172 | if (IS_ERR(device)) { |