diff options
| author | Alan Cox <alan@linux.intel.com> | 2012-05-14 14:51:22 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-01 15:15:46 +0800 |
| commit | 084a66bbb3dad4431692e4e0ebc673c93b23c340 (patch) | |
| tree | 4ab9963c5acd2cc84643080704878abb02c0d804 | |
| parent | 98e2a3c2af332867f0bb979c32470b9c4ca19d42 (diff) | |
tty: Allow uart_register/unregister/register
commit 1e66cded334e6cea596c72f6f650eec351b1e959 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/tty/serial/serial_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 13056180adf5..8f5d0d8a2f10 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2283,6 +2283,7 @@ void uart_unregister_driver(struct uart_driver *drv) tty_unregister_driver(p); put_tty_driver(p); kfree(drv->state); + drv->state = NULL; drv->tty_driver = NULL; } |
