mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 14:04:05 +08:00
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: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9b42bb750f
commit
656fb86770
@ -3249,8 +3249,8 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
|
||||
bool cdev = false;
|
||||
|
||||
if (index >= driver->num) {
|
||||
printk(KERN_ERR "Attempt to register invalid tty line number "
|
||||
" (%d).\n", index);
|
||||
pr_err("%s: Attempt to register invalid tty line number (%d)\n",
|
||||
driver->name, index);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user