When a card instance with a higher card number is registered, warning
messages are spewed eventually with stack traces due to the invalid minor
number for OSS device registration. For example, thinkpad-acpi registers
the card number 29 as default, and you'll see always these messages.
This is rather confusing (and worries users), thus better to return
simply the error code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
default:
return -EINVAL;
}
- if (snd_BUG_ON(minor < 0 || minor >= SNDRV_OSS_MINORS))
+ if (minor < 0 || minor >= SNDRV_OSS_MINORS)
return -EINVAL;
return minor;
}