aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-05-14 09:51:22 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 12:04:28 -0400
commit1e66cded334e6cea596c72f6f650eec351b1e959 (patch)
treeab344befd3d74f3ff168d0ab264adb3020e60a34 /drivers/tty
parent1541f845d123a48fbca3cee32b2963b3fb3da83a (diff)
tty: Allow uart_register/unregister/register
This is legitimate but because we don't clear the drv->state pointer in the unregister code causes a bogus BUG(). Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=42880 Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 59fb3ba1e7ca..a21dc8e3b7c0 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2282,6 +2282,7 @@ void uart_unregister_driver(struct uart_driver *drv)
2282 tty_unregister_driver(p); 2282 tty_unregister_driver(p);
2283 put_tty_driver(p); 2283 put_tty_driver(p);
2284 kfree(drv->state); 2284 kfree(drv->state);
2285 drv->state = NULL;
2285 drv->tty_driver = NULL; 2286 drv->tty_driver = NULL;
2286} 2287}
2287 2288