Skip to content

Commit b601e1f

Browse files
Xichao Zhaogregkh
authored andcommitted
tty: remove redundant condition checks
Remove redundant condition checks and replace else if with else. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Link: https://lore.kernel.org/r/20250905091321.437476-1-zhao.xichao@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent da7e8b3 commit b601e1f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/tty/hvc/hvc_console.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static void hvc_console_print(struct console *co, const char *b,
184184
hvc_console_flush(cons_ops[index],
185185
vtermnos[index]);
186186
}
187-
} else if (r > 0) {
187+
} else {
188188
i -= r;
189189
if (i > 0)
190190
memmove(c, c+r, i);

drivers/tty/serial/msm_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ msm_find_best_baud(struct uart_port *port, unsigned int baud,
11021102

11031103
if (result == baud)
11041104
break;
1105-
} else if (entry->divisor > divisor) {
1105+
} else {
11061106
old = target;
11071107
target = clk_round_rate(msm_port->clk, old + 1);
11081108
/*

0 commit comments

Comments
 (0)