Skip to content

Commit ba7ffcd

Browse files
rddunlaprafaeljw
authored andcommitted
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: 317cf7e ("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>
1 parent 444e115 commit ba7ffcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/power/hibernate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ static int __init resumedelay_setup(char *str)
13301330
int rc = kstrtouint(str, 0, &resume_delay);
13311331

13321332
if (rc)
1333-
return rc;
1333+
pr_warn("resumedelay: bad option string '%s'\n", str);
13341334
return 1;
13351335
}
13361336

0 commit comments

Comments
 (0)