summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/elmcan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/elmcan.c b/module/elmcan.c
index 2fd861d..33b0add 100644
--- a/module/elmcan.c
+++ b/module/elmcan.c
@@ -1215,14 +1215,14 @@ static void elmcan_ldisc_close(struct tty_struct *tty)
/* At this point, all ldisc calls to us have become no-ops. */
+ flush_work(&elm->tx_work);
+
/* Mark channel as dead */
spin_lock_bh(&elm->lock);
tty->disc_data = NULL;
elm->tty = NULL;
spin_unlock_bh(&elm->lock);
- flush_work(&elm->tx_work);
-
netdev_info(elm->dev, "elmcan off %s.\n", tty->name);
kfree(elm->txbuf);