提交 25080652 编写于 作者: P Peter Hurley 提交者: Greg Kroah-Hartman

tty: core: Remove redundant oom message

kmalloc() already emits a diagnostic for failed allocations; remove
tty-specific message.
Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 076fe303
......@@ -1580,10 +1580,8 @@ void tty_free_termios(struct tty_struct *tty)
tp = tty->driver->termios[idx];
if (tp == NULL) {
tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
if (tp == NULL) {
pr_warn("tty: no memory to save termios state.\n");
if (tp == NULL)
return;
}
tty->driver->termios[idx] = tp;
}
*tp = tty->termios;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册