1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00

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>
This commit is contained in:
Xichao Zhao 2025-09-05 17:13:21 +08:00 committed by Greg Kroah-Hartman
parent da7e8b3823
commit b601e1f41e
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ static void hvc_console_print(struct console *co, const char *b,
hvc_console_flush(cons_ops[index],
vtermnos[index]);
}
} else if (r > 0) {
} else {
i -= r;
if (i > 0)
memmove(c, c+r, i);

View File

@ -1102,7 +1102,7 @@ msm_find_best_baud(struct uart_port *port, unsigned int baud,
if (result == baud)
break;
} else if (entry->divisor > divisor) {
} else {
old = target;
target = clk_round_rate(msm_port->clk, old + 1);
/*