summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2022-02-28 14:05:32 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-20 09:08:13 +0200
commit566dee27c204396208edd24019b619922de69a30 (patch)
treec321c9725eaacf644eaa251d440a650dc0dd2c6a /kernel
parenteb0276376ec9675368f60e0bdef93617904b7451 (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index e68b1c20ad3d..f4ecb23c9194 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -1186,7 +1186,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;
}