char: mxser: remove unnesesary NULL check
Subsystems (3)
PATCH 1/1 char: mxser: remove unnesesary NULL check
mxser_transmit_chars(tty, port) is called only from mxser_interrupt(). NULL check is performed in mxser_interrupt() so it is redundant here.
Signed-off-by Kulikov Vasiliy <[email protected]>
--- drivers/char/mxser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/mxser.c +1 -1
@@ -2193,7 +2193,7 @@ static void mxser_transmit_chars(struct tty_struct *tty, struct mxser_port *port port->mon_data.up_txcnt += (cnt - port->xmit_cnt); port->icount.tx += (cnt - port->xmit_cnt); -if (port->xmit_cnt <WAKEUP_CHARS && tty) +if (port->xmit_cnt <WAKEUP_CHARS )tty_wakeup (tty);if (port->xmit_cnt <=0 ) {
Signature · 1 line
1.7.0.4
Quoted 4 lines · Kulikov Vasiliy
mxser_transmit_chars(tty, port)is called only frommxser_interrupt(). NULL check is performed inmxser_interrupt()so it is redundant here.Signed-off-by Kulikov Vasiliy <[email protected]>
Acked-by Jiri Slaby <[email protected]>
Quoted 17 lines
--- drivers/char/mxser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/char/mxser.c +1
-1@@ -2193,7 +2193,7 @@ static void mxser_transmit_chars(struct tty_struct *tty, struct mxser_port *port port->mon_data.up_txcnt += (cnt - port->xmit_cnt); port->icount.tx += (cnt - port->xmit_cnt); -if (port->xmit_cnt <WAKEUP_CHARS && tty) +if (port->xmit_cnt <WAKEUP_CHARS )tty_wakeup (tty);if (port->xmit_cnt <=0 ) {
Signature · 1 line
js