mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-02 01:08:05 +00:00
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> Signed-off-by: maurerr <mariusd84@gmail.com>
This commit is contained in:
parent
a12f5baa8b
commit
f0f6eaa15d
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user