mirror of https://gitee.com/openkylin/linux.git
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: Xiaofei Tan <tanxiaofei@huawei.com> Link: https://lore.kernel.org/r/1617779210-51576-10-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
72a8dcd7bb
commit
408795b025
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue