Commit 811a9c61 authored by Russell King's avatar Russell King

[SERIAL] Eliminate a couple of redundant tests

There is no way that tty can be NULL in uart_put_char() and
uart_write().  Eliminate these redundant tests.
parent 672ab41e
...@@ -529,7 +529,6 @@ static void uart_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -529,7 +529,6 @@ static void uart_put_char(struct tty_struct *tty, unsigned char ch)
{ {
struct uart_state *state = tty->driver_data; struct uart_state *state = tty->driver_data;
if (tty)
__uart_put_char(state->port, &state->info->xmit, ch); __uart_put_char(state->port, &state->info->xmit, ch);
} }
...@@ -545,7 +544,7 @@ uart_write(struct tty_struct *tty, int from_user, const unsigned char * buf, ...@@ -545,7 +544,7 @@ uart_write(struct tty_struct *tty, int from_user, const unsigned char * buf,
struct uart_state *state = tty->driver_data; struct uart_state *state = tty->driver_data;
int ret; int ret;
if (!tty || !state->info->xmit.buf) if (!state->info->xmit.buf)
return 0; return 0;
if (from_user) if (from_user)
......
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