Commit 408795b0 authored by Xiaofei Tan's avatar Xiaofei Tan Committed by Greg Kroah-Hartman

tty: tty_ldisc: Do not use assignment in if condition

Do not use assignment in if condition following the advice of
checkpatch.pl.
Signed-off-by: default avatarXiaofei Tan <tanxiaofei@huawei.com>
Link: https://lore.kernel.org/r/1617779210-51576-10-git-send-email-tanxiaofei@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 72a8dcd7
......@@ -508,7 +508,8 @@ static int tty_ldisc_failto(struct tty_struct *tty, int ld)
return PTR_ERR(disc);
tty->ldisc = disc;
tty_set_termios_ldisc(tty, ld);
if ((r = tty_ldisc_open(tty, disc)) < 0)
r = tty_ldisc_open(tty, disc);
if (r < 0)
tty_ldisc_put(disc);
return r;
}
......
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