Skip to contentSkip to conversation

char: mxser: remove unnesesary NULL check

PATCH In review Kulikov Vasiliy 2 participants 2 messages Jul 23, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/char/mxser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/mxser.c +1 -1
index d2692d4..3fc89da 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Kulikov Vasiliy

mxser_transmit_chars(tty, port) is called only from mxser_interrupt(). NULL check is performed in mxser_interrupt() so it is redundant here.

Quoted 17 lines
---
 drivers/char/mxser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/mxser.c +1 -1
index d2692d4..3fc89da 100644
@@ -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