hvcs: Get reference to tty in remove
authorBrian King <brking@linux.vnet.ibm.com>
Fri, 3 Feb 2023 15:58:00 +0000 (09:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 12:09:15 +0000 (13:09 +0100)
commit3a8d3b366ce47024bf274eac783f8af5df2780f5
treee77897467377b0eb1adc0bdb655ad10a5365b3fd
parent503a90dd619d52dcac2cc68bd742aa914c7cd47a
hvcs: Get reference to tty in remove

Grab a reference to the tty when removing the hvcs to ensure
it does not get freed unexpectedly.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20230203155802.404324-4-brking@linux.vnet.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvcs.c