Skip to content

Commit 53819a0

Browse files
rddunlapgregkh
authored andcommitted
tty: hvc: fix return value of __setup handler
__setup() handlers should return 1 to indicate that the boot option has been handled or 0 to indicate that it was not handled. Add a pr_warn() message if the option value is invalid and then always return 1. Link: lore.kernel.org/r/[email protected] Fixes: 86b4056 ("tty: replace strict_strtoul() with kstrtoul()") Cc: Jingoo Han <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Julian Wiedmann <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: [email protected] Reported-by: Igor Zhbanov <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3631e48 commit 53819a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/tty/hvc/hvc_iucv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,9 @@ static int __init hvc_iucv_init(void)
14171417
*/
14181418
static int __init hvc_iucv_config(char *val)
14191419
{
1420-
return kstrtoul(val, 10, &hvc_iucv_devices);
1420+
if (kstrtoul(val, 10, &hvc_iucv_devices))
1421+
pr_warn("hvc_iucv= invalid parameter value '%s'\n", val);
1422+
return 1;
14211423
}
14221424

14231425

0 commit comments

Comments
 (0)