summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/uart.c
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2016-02-05 13:50:37 +0000
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-05 16:43:41 -0800
commit9d4bb6c9183f1283158bbb00ebf65ec4cf18ee33 (patch)
treee88480b26ab22dd84dc0da43d95b7a1043b9c95b /drivers/staging/greybus/uart.c
parent9d15134d067ecb52bf02136234fbd1d09e1706d8 (diff)
greybus: uart: fix double free of tty port
When inserting and removing a module with a UART protocol defined a double free of the tty_port would happen and that would generate a lot of kernel oops in different places related to memory corruption. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/uart.c')
-rw-r--r--drivers/staging/greybus/uart.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index 1ba8476ce982..46cce8c82412 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -701,7 +701,6 @@ static void gb_uart_connection_exit(struct gb_connection *connection)
/* FIXME - free transmit / receive buffers */
- tty_port_put(&gb_tty->port);
tty_port_destroy(&gb_tty->port);
kfree(gb_tty->buffer);
kfree(gb_tty);