projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72a8dcd
)
tty: tty_ldisc: Do not use assignment in if condition
author
Xiaofei Tan
<tanxiaofei@huawei.com>
Wed, 7 Apr 2021 07:06:49 +0000
(15:06 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 10 Apr 2021 08:33:00 +0000
(10:33 +0200)
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>
drivers/tty/tty_ldisc.c
patch
|
blob
|
history
diff --git
a/drivers/tty/tty_ldisc.c
b/drivers/tty/tty_ldisc.c
index 874d238236e6c1442d27e697b269f5069daaf66a..56e67f770b6d367760bc6f4fabd7220f9b00ef17 100644
(file)
--- a/
drivers/tty/tty_ldisc.c
+++ b/
drivers/tty/tty_ldisc.c
@@
-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;
}