TTY: tty_alloc_driver() returns error pointers
We changed these from alloc_tty_driver() to tty_alloc_driver() so the error handling needs to modified to check for IS_ERR() instead of NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
88ed2a6061
commit
c3a6344ae4
@@ -187,8 +187,8 @@ static int __init ttyprintk_init(void)
|
||||
TTY_DRIVER_RESET_TERMIOS |
|
||||
TTY_DRIVER_REAL_RAW |
|
||||
TTY_DRIVER_UNNUMBERED_NODE);
|
||||
if (!ttyprintk_driver)
|
||||
return ret;
|
||||
if (IS_ERR(ttyprintk_driver))
|
||||
return PTR_ERR(ttyprintk_driver);
|
||||
|
||||
ttyprintk_driver->driver_name = "ttyprintk";
|
||||
ttyprintk_driver->name = "ttyprintk";
|
||||
|
Reference in New Issue
Block a user