aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/moxa.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-08-16 09:16:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-16 15:07:23 -0400
commitc3a6344ae475763b6fb0fb2ec3639004f500d0f1 (patch)
tree3279f1e5f5651d322a2177da2108f465bd9c194d /drivers/tty/moxa.c
parent88ed2a60610974443335c924d7cb8e5dcf9dbdc1 (diff)
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>
Diffstat (limited to 'drivers/tty/moxa.c')
-rw-r--r--drivers/tty/moxa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 3b17a044c212..56e616b9109a 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -1048,8 +1048,8 @@ static int __init moxa_init(void)
1048 moxaDriver = tty_alloc_driver(MAX_PORTS + 1, 1048 moxaDriver = tty_alloc_driver(MAX_PORTS + 1,
1049 TTY_DRIVER_REAL_RAW | 1049 TTY_DRIVER_REAL_RAW |
1050 TTY_DRIVER_DYNAMIC_DEV); 1050 TTY_DRIVER_DYNAMIC_DEV);
1051 if (!moxaDriver) 1051 if (IS_ERR(moxaDriver))
1052 return -ENOMEM; 1052 return PTR_ERR(moxaDriver);
1053 1053
1054 moxaDriver->name = "ttyMX"; 1054 moxaDriver->name = "ttyMX";
1055 moxaDriver->major = ttymajor; 1055 moxaDriver->major = ttymajor;