diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index b64cd64a0563..86e379a38219 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -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); }