Skip to content

Commit cc85f7a

Browse files
committed
ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check
NULL user-space buffer can be passed even in a normal path, thus it's not good to spew a kernel warning with stack trace at each time. Just drop snd_BUG_ON() macro usage there. BugLink: http://lkml.kernel.org/r/CACT4Y+YfVJ3L+q0i-4vyQVyyPD7V=OMX0PWPi29x9Bo3QaBLdw@mail.gmail.com Reported-by: Dmitry Vyukov <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 2d1b5c0 commit cc85f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/core/rawmidi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ static long snd_rawmidi_kernel_write1(struct snd_rawmidi_substream *substream,
11781178
long count1, result;
11791179
struct snd_rawmidi_runtime *runtime = substream->runtime;
11801180

1181-
if (snd_BUG_ON(!kernelbuf && !userbuf))
1181+
if (!kernelbuf && !userbuf)
11821182
return -EINVAL;
11831183
if (snd_BUG_ON(!runtime->buffer))
11841184
return -EINVAL;

0 commit comments

Comments
 (0)