summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/kgdb_nmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/kgdb_nmi.c')
-rw-r--r--drivers/tty/serial/kgdb_nmi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index d185247ba1a..6ac2b797a76 100644
--- a/drivers/tty/serial/kgdb_nmi.c
+++ b/drivers/tty/serial/kgdb_nmi.c
@@ -266,6 +266,7 @@ static int kgdb_nmi_tty_install(struct tty_driver *drv, struct tty_struct *tty)
}
return 0;
err:
+ tty_port_destroy(&priv->port);
kfree(priv);
return ret;
}
@@ -275,6 +276,7 @@ static void kgdb_nmi_tty_cleanup(struct tty_struct *tty)
struct kgdb_nmi_tty_priv *priv = tty->driver_data;
tty->driver_data = NULL;
+ tty_port_destroy(&priv->port);
kfree(priv);
}