Commit b601e1f4 authored by Xichao Zhao's avatar Xichao Zhao Committed by Greg Kroah-Hartman
Browse files

tty: remove redundant condition checks



Remove redundant condition checks and replace else if with else.

Signed-off-by: default avatarXichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20250905091321.437476-1-zhao.xichao@vivo.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent da7e8b38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);
			/*