mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 08:18:47 +00:00
Add kref to fake tty used by USB console
We alloc a fake tty in usb serial console setup function. we should init the tty's kref otherwise we will face WARN_ON after following invoke of tty_port_tty_set --> tty_kref_get. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
296fa7f6a3
commit
e5404586a4
@ -135,6 +135,7 @@ static int usb_console_setup(struct console *co, char *options)
|
||||
err("no more memory");
|
||||
goto reset_open_count;
|
||||
}
|
||||
kref_init(&tty->kref);
|
||||
termios = kzalloc(sizeof(*termios), GFP_KERNEL);
|
||||
if (!termios) {
|
||||
retval = -ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user