Browse Source

rtl838x: fix incorrect assignment from kstrtoul in serial.c

Assign return value of kstrtoul to error variable instead of
conversion value.

Suggested-by: Birger Koblitz <[email protected]>
Signed-off-by: Adrian Schmutzler <[email protected]>
Adrian Schmutzler 5 years ago
parent
commit
300173950d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c

+ 1 - 1
target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c

@@ -54,7 +54,7 @@ int __init rtl838x_serial_init(void)
 	s = strstr(arcs_cmdline, "console=ttyS0,");
 	if (s) {
 		s += 14;
-		baud = kstrtoul(s, 10, &baud);
+		err = kstrtoul(s, 10, &baud);
 		if (err)
 			baud = 0;
 		while (isdigit(*s))