]> git.baikalelectronics.ru Git - kernel.git/commit
PM: hibernate: fix __setup handler error handling
authorRandy Dunlap <rdunlap@infradead.org>
Mon, 28 Feb 2022 22:05:32 +0000 (14:05 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Mar 2022 17:51:11 +0000 (18:51 +0100)
commitf75e42cc1e4492a45ccdb8834bf5dd3ffef07b74
treebc20ecb6ad428773c0d2b60b5d401d951db41b1c
parentc3fd759b6cea6ad77f8576ddf545296baaac389a
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: bcca25f92fb88 ("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>
kernel/power/hibernate.c