提交 ba7ffcd4 编写于 作者: R Randy Dunlap 提交者: Rafael J. Wysocki

PM: hibernate: fix __setup handler error handling

If an invalid value is used in "resumedelay=<seconds>", it is
silently ignored. Add a warning message and then let the __setup
handler return 1 to indicate that the kernel command line option
has been handled.

Fixes: 317cf7e5 ("PM / hibernate: convert simple_strtoul to kstrtoul")
Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
Reported-by: NIgor Zhbanov <i.zhbanov@omprussia.ru>
Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 444e1154
...@@ -1330,7 +1330,7 @@ static int __init resumedelay_setup(char *str) ...@@ -1330,7 +1330,7 @@ static int __init resumedelay_setup(char *str)
int rc = kstrtouint(str, 0, &resume_delay); int rc = kstrtouint(str, 0, &resume_delay);
if (rc) if (rc)
return rc; pr_warn("resumedelay: bad option string '%s'\n", str);
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册