mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
staging: speakup: signedness bug in spk_ttyio_in_nowait()
On most of the common arches char is signed so it can't ever == 0xff.
Let's fix this by making it a u8.
Fixes: 6b9ad1c742
("staging: speakup: add send_xchar, tiocmset and input functionality for tty")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d70dd24521
commit
e45423d76f
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ static unsigned char spk_ttyio_in(void)
|
|||
|
||||
static unsigned char spk_ttyio_in_nowait(void)
|
||||
{
|
||||
char rv = ttyio_in(0);
|
||||
u8 rv = ttyio_in(0);
|
||||
|
||||
return (rv == 0xff) ? 0 : rv;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue