Assign return value of kstrtoul to error variable instead of conversion value. Suggested-by: Birger Koblitz <[email protected]> Signed-off-by: Adrian Schmutzler <[email protected]>
@@ -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))