aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/hvsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index 41db8060e8f7..54cbb58b8740 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -311,7 +311,8 @@ static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet,
311 /* CD went away; no more connection */ 311 /* CD went away; no more connection */
312 pr_debug("hvsi%i: CD dropped\n", hp->index); 312 pr_debug("hvsi%i: CD dropped\n", hp->index);
313 hp->mctrl &= TIOCM_CD; 313 hp->mctrl &= TIOCM_CD;
314 if (!(hp->tty->flags & CLOCAL)) 314 /* If userland hasn't done an open(2) yet, hp->tty is NULL. */
315 if (hp->tty && !(hp->tty->flags & CLOCAL))
315 *to_hangup = hp->tty; 316 *to_hangup = hp->tty;
316 } 317 }
317 break; 318 break;