浏览代码

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 <tiwai@suse.de>
Takashi Iwai 15 年之前
父节点
当前提交
808c569f36
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      sound/core/sound_oss.c

+ 1 - 1
sound/core/sound_oss.c

@@ -93,7 +93,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
 	default:
 	default:
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
-	if (snd_BUG_ON(minor < 0 || minor >= SNDRV_OSS_MINORS))
+	if (minor < 0 || minor >= SNDRV_OSS_MINORS)
 		return -EINVAL;
 		return -EINVAL;
 	return minor;
 	return minor;
 }
 }