[openwrt/openwrt] rtl838x: fix incorrect assignment from kstrtoul in serial.c

LEDE Commits lede-commits at lists.infradead.org
Wed Sep 16 10:31:39 EDT 2020


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/300173950da07e43b56d819114c1d1271ea213cc

commit 300173950da07e43b56d819114c1d1271ea213cc
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Wed Sep 16 16:29:21 2020 +0200

    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 at birger-koblitz.de>
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



More information about the lede-commits mailing list