diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-10-25 16:51:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-26 20:19:41 +0300 |
commit | 408a507996e4c2ba943bc9b28be8bbb8424410b1 (patch) | |
tree | edb09467a7030b04609b87aeef00a15847efe453 /drivers/tty/rpmsg_tty.c | |
parent | 0572da285d694e945303e74b7f9084b41e02ecbd (diff) | |
download | linux-408a507996e4c2ba943bc9b28be8bbb8424410b1.tar.xz |
tty: rpmsg: Unify variable used to keep an error code
In some ret is used, in the other err. Let's unify it across the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211025135148.53944-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/rpmsg_tty.c')
-rw-r--r-- | drivers/tty/rpmsg_tty.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/tty/rpmsg_tty.c b/drivers/tty/rpmsg_tty.c index 8c17ddbf371d..fc5d33dc4cb8 100644 --- a/drivers/tty/rpmsg_tty.c +++ b/drivers/tty/rpmsg_tty.c @@ -114,22 +114,22 @@ static const struct tty_operations rpmsg_tty_ops = { static struct rpmsg_tty_port *rpmsg_tty_alloc_cport(void) { struct rpmsg_tty_port *cport; - int err; + int ret; cport = kzalloc(sizeof(*cport), GFP_KERNEL); if (!cport) return ERR_PTR(-ENOMEM); mutex_lock(&idr_lock); - err = idr_alloc(&tty_idr, cport, 0, MAX_TTY_RPMSG, GFP_KERNEL); + ret = idr_alloc(&tty_idr, cport, 0, MAX_TTY_RPMSG, GFP_KERNEL); mutex_unlock(&idr_lock); - if (err < 0) { + if (ret < 0) { kfree(cport); - return ERR_PTR(err); + return ERR_PTR(ret); } - cport->id = err; + cport->id = ret; return cport; } @@ -217,7 +217,7 @@ static struct rpmsg_driver rpmsg_tty_rpmsg_drv = { static int __init rpmsg_tty_init(void) { - int err; + int ret; rpmsg_tty_driver = tty_alloc_driver(MAX_TTY_RPMSG, TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); @@ -236,15 +236,15 @@ static int __init rpmsg_tty_init(void) tty_set_operations(rpmsg_tty_driver, &rpmsg_tty_ops); - err = tty_register_driver(rpmsg_tty_driver); - if (err < 0) { - pr_err("Couldn't install rpmsg tty driver: err %d\n", err); + ret = tty_register_driver(rpmsg_tty_driver); + if (ret < 0) { + pr_err("Couldn't install rpmsg tty driver: %d\n", ret); goto error_put; } - err = register_rpmsg_driver(&rpmsg_tty_rpmsg_drv); - if (err < 0) { - pr_err("Couldn't register rpmsg tty driver: err %d\n", err); + ret = register_rpmsg_driver(&rpmsg_tty_rpmsg_drv); + if (ret < 0) { + pr_err("Couldn't register rpmsg tty driver: %d\n", ret); goto error_unregister; } @@ -256,7 +256,7 @@ error_unregister: error_put: tty_driver_kref_put(rpmsg_tty_driver); - return err; + return ret; } static void __exit rpmsg_tty_exit(void) |