diff options
author | Li zeming <zeming@nfschina.com> | 2023-02-23 04:23:03 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-09 17:11:18 +0100 |
commit | 728648c7c8bb054023b9b9f367e349d5b0afafd8 (patch) | |
tree | 4e2559de9026c92322bd7733d299163a925b58f1 /drivers/tty/tty_ldisc.c | |
parent | fe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff) |
tty: tty_ldisc: Remove the ret variable
The int variable ret does not receive the return value in this function.
It should be removed and returned 0 directly.
Signed-off-by: Li zeming <zeming@nfschina.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230222202303.3195-1-zeming@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_ldisc.c')
-rw-r--r-- | drivers/tty/tty_ldisc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index e758f44729e7..3f68e213df1f 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c @@ -58,7 +58,6 @@ static struct tty_ldisc_ops *tty_ldiscs[NR_LDISCS]; int tty_register_ldisc(struct tty_ldisc_ops *new_ldisc) { unsigned long flags; - int ret = 0; if (new_ldisc->num < N_TTY || new_ldisc->num >= NR_LDISCS) return -EINVAL; @@ -67,7 +66,7 @@ int tty_register_ldisc(struct tty_ldisc_ops *new_ldisc) tty_ldiscs[new_ldisc->num] = new_ldisc; raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags); - return ret; + return 0; } EXPORT_SYMBOL(tty_register_ldisc); |