diff options
| -rw-r--r-- | sound/core/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index 1351f22f651c..e3c93cd77ee7 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
| @@ -170,7 +170,7 @@ int snd_card_create(int idx, const char *xid, | |||
| 170 | if (idx < 0) { | 170 | if (idx < 0) { |
| 171 | for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) { | 171 | for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) { |
| 172 | /* idx == -1 == 0xffff means: take any free slot */ | 172 | /* idx == -1 == 0xffff means: take any free slot */ |
| 173 | if (idx2 < sizeof(int) && !(idx & (1U << idx2))) | 173 | if (idx2 < 32 && !(idx & (1U << idx2))) |
| 174 | continue; | 174 | continue; |
| 175 | if (!test_bit(idx2, snd_cards_lock)) { | 175 | if (!test_bit(idx2, snd_cards_lock)) { |
| 176 | if (module_slot_match(module, idx2)) { | 176 | if (module_slot_match(module, idx2)) { |
| @@ -183,7 +183,7 @@ int snd_card_create(int idx, const char *xid, | |||
| 183 | if (idx < 0) { | 183 | if (idx < 0) { |
| 184 | for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) { | 184 | for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) { |
| 185 | /* idx == -1 == 0xffff means: take any free slot */ | 185 | /* idx == -1 == 0xffff means: take any free slot */ |
| 186 | if (idx2 < sizeof(int) && !(idx & (1U << idx2))) | 186 | if (idx2 < 32 && !(idx & (1U << idx2))) |
| 187 | continue; | 187 | continue; |
| 188 | if (!test_bit(idx2, snd_cards_lock)) { | 188 | if (!test_bit(idx2, snd_cards_lock)) { |
| 189 | if (!slots[idx2] || !*slots[idx2]) { | 189 | if (!slots[idx2] || !*slots[idx2]) { |
