aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-09-16 16:29:21 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-09-16 16:31:28 +0200
commit300173950da07e43b56d819114c1d1271ea213cc (patch)
treeeae061c98c964a8a4bc93ca5e083996f77381f95 /target/linux
parent5c0cecb6c6bef941b803c7494b087ac08c473f87 (diff)
downloadupstream-300173950da07e43b56d819114c1d1271ea213cc.tar.gz
upstream-300173950da07e43b56d819114c1d1271ea213cc.tar.bz2
upstream-300173950da07e43b56d819114c1d1271ea213cc.zip
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>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c b/target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c
index 8a85933baf..74a29c505e 100644
--- a/target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c
+++ b/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))