mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
The UART_DUMMY_DR_RX status bit is equal to (1 << 16), so a u16 is too small to hold that value. The result is that UART_DUMMY_DR_RX is never passed to uart_insert_char(). This means that we're always accepting characters, even when CREAD (in termios) is not set. Signed-off-by: Timur Tabi <timur@codeaurora.org> Reviewed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3e8137a185
commit
71a5cd8a4a
1 changed files with 2 additions and 2 deletions
|
@ -191,8 +191,8 @@ struct uart_amba_port {
|
|||
*/
|
||||
static int pl011_fifo_to_tty(struct uart_amba_port *uap)
|
||||
{
|
||||
u16 status, ch;
|
||||
unsigned int flag, max_count = 256;
|
||||
u16 status;
|
||||
unsigned int ch, flag, max_count = 256;
|
||||
int fifotaken = 0;
|
||||
|
||||
while (max_count--) {
|
||||
|
|
Loading…
Reference in a new issue