diff options
author | Xiaoming Ni <nixiaoming@huawei.com> | 2019-09-24 17:25:56 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 15:11:26 +0200 |
commit | 7726fb53e75fa48714181efd00167e0734303afb (patch) | |
tree | 6e96963aea9d4af231fe4d975b71896e0f25b282 /drivers/tty | |
parent | 530c4ba3fa05bf121b87b13befc2f5a7e97cea15 (diff) | |
download | linux-7726fb53e75fa48714181efd00167e0734303afb.tar.gz linux-7726fb53e75fa48714181efd00167e0734303afb.tar.bz2 linux-7726fb53e75fa48714181efd00167e0734303afb.zip |
tty:n_gsm.c: destroy port by tty_port_destroy()
According to the comment of tty_port_destroy():
When a port was initialized using tty_port_init, one has to destroy
the port by tty_port_destroy();
tty_port_init() is called in gsm_dlci_alloc()
so tty_port_destroy() needs to be called in gsm_dlci_free()
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
Link: https://lore.kernel.org/r/1569317156-45850-1-git-send-email-nixiaoming@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/n_gsm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 36a3eb4ad4c5..3f5bcc9b4f04 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1681,6 +1681,7 @@ static void gsm_dlci_free(struct tty_port *port) del_timer_sync(&dlci->t1); dlci->gsm->dlci[dlci->addr] = NULL; + tty_port_destroy(&dlci->port); kfifo_free(dlci->fifo); while ((dlci->skb = skb_dequeue(&dlci->skb_list))) dev_kfree_skb(dlci->skb); |