mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
tty: hvc: fix return value of __setup handler
[ Upstream commit 53819a0d97aace1425bb042829e3446952a9e8a9 ]
__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: 86b40567b9 ("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]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
0615a444c5
commit
7c617cb38c
1 changed files with 3 additions and 1 deletions
|
|
@ -1470,7 +1470,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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue