From: Takashi Iwai Date: Mon, 18 Jan 2010 13:16:24 +0000 (+0100) Subject: ALSA: Remove warning message for invalid OSS minor ranges X-Git-Tag: v2.6.33-rc5~18^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=808c569f3609b37642d1e08373e3de829b99d0f8;p=platform%2Fkernel%2Flinux-stable.git ALSA: Remove warning message for invalid OSS minor ranges 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 --- diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 7fe1226..0c164e5 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -93,7 +93,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev) default: return -EINVAL; } - if (snd_BUG_ON(minor < 0 || minor >= SNDRV_OSS_MINORS)) + if (minor < 0 || minor >= SNDRV_OSS_MINORS) return -EINVAL; return minor; }