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

tty: core: Add driver name to invalid device registration message

Include the driver name in the tty_register_device_attr() error
message for invalid index.

Note that tty_err() cannot be used here because there is no tty;
use pr_err().
Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9b42bb75
...@@ -3249,8 +3249,8 @@ struct device *tty_register_device_attr(struct tty_driver *driver, ...@@ -3249,8 +3249,8 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
bool cdev = false; bool cdev = false;
if (index >= driver->num) { if (index >= driver->num) {
printk(KERN_ERR "Attempt to register invalid tty line number " pr_err("%s: Attempt to register invalid tty line number (%d)\n",
" (%d).\n", index); driver->name, index);
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册