Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f61de569 authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

serial: msm_geni_serial: Fix console port number check



Return error pointer if the serial line number for the console
port is invalid.

Change-Id: I750ea07a4e703e15d5bf2c2545bbba42f1013625
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent b62fce34
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -486,7 +486,7 @@ static struct msm_geni_serial_port *get_port_from_line(int line,

	if (is_console) {
		if ((line < 0) || (line >= GENI_UART_CONS_PORTS))
			port = ERR_PTR(-ENXIO);
			return ERR_PTR(-ENXIO);
		port = &msm_geni_console_port;
	} else {
		if ((line < 0) || (line >= GENI_UART_NR_PORTS))