Skip to content

Commit

Permalink
ALSA: Remove warning message for invalid OSS minor ranges
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jan 18, 2010
1 parent c181a13 commit 808c569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/sound_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 808c569

Please sign in to comment.