tty: hvc: fix return value of __setup handler
PATCH 1/1 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.
Fixes 86b40567b917 ("tty: replace strict_strtoul() with kstrtoul()")
Signed-off-by Randy Dunlap <[email protected]>
Reported-by Igor Zhbanov <[email protected]>
Link lore.kernel.org/r/[email protected]
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]>
--- drivers/tty/hvc/hvc_iucv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/tty/hvc/hvc_iucv.c +3 -1
@@ -1417,7 +1417,9 @@ out_error:*/ static int __init hvc_iucv_config (char *val) { -return kstrtoul (val,10 , &hvc_iucv_devices); +if (kstrtoul (val,10 , &hvc_iucv_devices)) +pr_warn ("hvc_iucv= invalid parameter value '%s'\n" , val); +return 1 ; }