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 <git@birger-koblitz.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2020-09-16 16:29:21 +02:00
parent 5c0cecb6c6
commit 300173950d

View File

@ -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))