Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Xiaofei Tan and committed by
Greg Kroah-Hartman
408795b0 72a8dcd7

+2 -1
+2 -1
drivers/tty/tty_ldisc.c
··· 508 508 return PTR_ERR(disc); 509 509 tty->ldisc = disc; 510 510 tty_set_termios_ldisc(tty, ld); 511 - if ((r = tty_ldisc_open(tty, disc)) < 0) 511 + r = tty_ldisc_open(tty, disc); 512 + if (r < 0) 512 513 tty_ldisc_put(disc); 513 514 return r; 514 515 }