Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "tty:n_gsm.c: destroy port by tty_port_destroy()"

This reverts commit 7726fb53e75fa48714181efd00167e0734303afb.

Jiri writes:
On 24. 09. 19, 11:25, Xiaoming Ni wrote:
> 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();

It continues with a part saying:
Either indirectly by using tty_port refcounting
(tty_port_put) or directly if refcounting is not used.

So this should be reverted.

Cc: Xiaoming Ni <nixiaoming@huawei.com>
Reported-by: Jiri Slaby <jslaby@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

-1
-1
drivers/tty/n_gsm.c
··· 1681 1681 1682 1682 del_timer_sync(&dlci->t1); 1683 1683 dlci->gsm->dlci[dlci->addr] = NULL; 1684 - tty_port_destroy(&dlci->port); 1685 1684 kfifo_free(dlci->fifo); 1686 1685 while ((dlci->skb = skb_dequeue(&dlci->skb_list))) 1687 1686 dev_kfree_skb(dlci->skb);