Commit 728648c7 authored by Li zeming's avatar Li zeming Committed by Greg Kroah-Hartman

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: default avatarLi zeming <zeming@nfschina.com>
Reviewed-by: default avatarJiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230222202303.3195-1-zeming@nfschina.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe15c26e
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment