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

Commit d6c0240d authored by Ashish Kori's avatar Ashish Kori
Browse files

msm-geni-serial: Correct the unsupported baudrate error handling



Change the data-type of the variable used to hold the return value
of (get_clk_div_rate) api from unsigned int to int. This avoids the
implicit type-cast, which might result in improper error handling.

Change-Id: If780d9085acc33d27c2626936deeabd58aa5d7dd
Signed-off-by: default avatarAshish Kori <akori@codeaurora.org>
parent cafb299b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2006,7 +2006,7 @@ static void msm_geni_serial_set_termios(struct uart_port *uport,
	unsigned int rx_trans_cfg;
	unsigned int rx_parity_cfg;
	unsigned int stop_bit_len;
	unsigned int clk_div;
	int clk_div;
	unsigned long ser_clk_cfg = 0;
	struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
	unsigned long clk_rate;
@@ -2304,7 +2304,7 @@ msm_geni_serial_earlycon_setup(struct earlycon_device *dev,
	u32 bits_per_char = 0;
	u32 s_clk_cfg = 0;
	u32 baud = 115200;
	u32 clk_div;
	int clk_div;
	unsigned long clk_rate;
	unsigned long cfg0, cfg1;