diff options
author | Randy Dunlap <rdunlap@infradead.org> | 2022-02-28 14:05:32 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 14:23:07 +0200 |
commit | d0cd9da501f65545c02cb7a220061e52c9e4b222 (patch) | |
tree | 91cec9ef8fec73119c65ce3d198cda8e18d89288 /kernel | |
parent | efaa0e969261e97c1fdd8e0338e5dd3ba5b9219c (diff) | |
download | linux-stable-d0cd9da501f65545c02cb7a220061e52c9e4b222.tar.gz linux-stable-d0cd9da501f65545c02cb7a220061e52c9e4b222.tar.bz2 linux-stable-d0cd9da501f65545c02cb7a220061e52c9e4b222.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>
Diffstat (limited to 'kernel')
-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 b0888e9224da..d926852f8119 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -1326,7 +1326,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; } |