rtl838x: fix incorrect assignment from kstrtoul in serial.c
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 16 Sep 2020 14:29:21 +0000 (16:29 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 16 Sep 2020 14:31:28 +0000 (16:31 +0200)
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>
target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c

index 8a85933baf7952dd7463014a04051f7c41c2877a..74a29c505e60af81f90d8800bc7303676e58fdc9 100644 (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))