greybus: uart: fix double free of tty port
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 5 Feb 2016 13:50:37 +0000 (13:50 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 6 Feb 2016 00:43:41 +0000 (16:43 -0800)
commit9d4bb6c9183f1283158bbb00ebf65ec4cf18ee33
treee88480b26ab22dd84dc0da43d95b7a1043b9c95b
parent9d15134d067ecb52bf02136234fbd1d09e1706d8
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>
drivers/staging/greybus/uart.c