Commit f8abc670 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] sb16 sample size fix

From: Andreas Kies <andikies@t-online.de>

Fix improperly handled 16 bit sample size.  If you use an odd number of
bytes in 16 bit mode the driver fails to work.
parent 9352726c
......@@ -882,7 +882,7 @@ sb16_copy_from_user(int dev,
c -= locallen; p += locallen;
}
/* used = ( samples * 16 bits size ) */
*used = len << 1;
*used = max_in > ( max_out << 1) ? (max_out << 1) : max_in;
/* returned = ( samples * 8 bits size ) */
*returned = len;
}
......
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