diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2022-02-28 14:05:32 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-15 14:14:43 +0200 |
commit | 4b2f9e6a41680c8176e3752c20c04a211b1c6240 (patch) | |
tree | 8a574022788cd4764ab6ff86150bc85c253a63ca | |
parent | b2001eb10f59363da930cdd6e086a2861986fa18 (diff) | |
download | linux-stable-4b2f9e6a41680c8176e3752c20c04a211b1c6240.tar.gz linux-stable-4b2f9e6a41680c8176e3752c20c04a211b1c6240.tar.bz2 linux-stable-4b2f9e6a41680c8176e3752c20c04a211b1c6240.zip |
PM: hibernate: fix __setup handler error handling
[ Upstream commit ba7ffcd4c4da374b0f64666354eeeda7d3827131 ]
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: 317cf7e5e85e3 ("PM / hibernate: convert simple_strtoul to kstrtoul")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Igor Zhbanov <i.zhbanov@omprussia.ru>
Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | kernel/power/hibernate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 6670a44ec5d4..6abdfdf571ee 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -1219,7 +1219,7 @@ static int __init resumedelay_setup(char *str) int rc = kstrtouint(str, 0, &resume_delay); if (rc) - return rc; + pr_warn("resumedelay: bad option string '%s'\n", str); return 1; } |