mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-21 01:41:41 +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>
This commit is contained in:
parent
5c0cecb6c6
commit
300173950d
@ -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