summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/sclp_tty.c')
-rw-r--r--drivers/s390/char/sclp_tty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index 30ec09e3d037..877fbc37c1e7 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -547,7 +547,6 @@ sclp_tty_init(void)
sclp_tty_tolower = 1;
}
sclp_tty_chars_count = 0;
- tty_port_init(&sclp_port);
rc = sclp_register(&sclp_input_event);
if (rc) {
@@ -555,6 +554,8 @@ sclp_tty_init(void)
return rc;
}
+ tty_port_init(&sclp_port);
+
driver->driver_name = "sclp_line";
driver->name = "sclp_line";
driver->major = TTY_MAJOR;
@@ -571,6 +572,7 @@ sclp_tty_init(void)
rc = tty_register_driver(driver);
if (rc) {
put_tty_driver(driver);
+ tty_port_destroy(&sclp_port);
return rc;
}
sclp_tty_driver = driver;