Commit 8466c1e8 authored by Mikael Pettersson's avatar Mikael Pettersson Committed by Linus Torvalds

[PATCH] sound_oss_sb_audio.c copy_from_user buglets

 Fallout of copy_from_user() cleanups. sb16_copy_from_user()
 returns void not int, so it can't return -EFAULT.
parent 232e4f2c
......@@ -851,7 +851,7 @@ sb16_copy_from_user(int dev,
{
if (copy_from_user(localbuf + localoffs,
userbuf + useroffs, len))
return -EFAULT;
return;
*used = len;
*returned = len;
}
......@@ -874,7 +874,7 @@ sb16_copy_from_user(int dev,
if (copy_from_user(lbuf16,
userbuf + useroffs + (p << 1),
locallen << 1))
return -EFAULT;
return;
for (i = 0; i < locallen; i++)
{
buf8[p+i] = ~((lbuf16[i] >> 8) & 0xff) ^ 0x80;
......@@ -904,7 +904,7 @@ sb16_copy_from_user(int dev,
if (copy_from_user(lbuf8,
userbuf+useroffs + p,
locallen))
return -EFAULT;
return;
for (i = 0; i < locallen; i++)
{
buf16[p+i] = (~lbuf8[i] ^ 0x80) << 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment