diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-05-10 01:25:18 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-05-10 01:25:18 -0700 |
| commit | 6e5dae3ae1af25ac48b005ccfb2cf7e033d312ce (patch) | |
| tree | ae877abfc5e691423dd5dbafab2a2eda81760e58 /drivers/tty/tty_io.c | |
| parent | d7521d9bb9408dd4225b9838e23a80ecc41f80fa (diff) | |
| parent | 028ce831e8f14cc94f14929f1a91d198ea2d9b93 (diff) | |
Merge "Merge android-4.4.131 (d5d6526) into msm-4.4"
Diffstat (limited to 'drivers/tty/tty_io.c')
| -rw-r--r-- | drivers/tty/tty_io.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 89fd20382ce4..198451fa9e5d 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3154,7 +3154,10 @@ struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx) kref_init(&tty->kref); tty->magic = TTY_MAGIC; - tty_ldisc_init(tty); + if (tty_ldisc_init(tty)) { + kfree(tty); + return NULL; + } tty->session = NULL; tty->pgrp = NULL; mutex_init(&tty->legacy_mutex); |
