]> git.ipfire.org Git - thirdparty/linux.git/commit
init: Replace simple_strtoul() with kstrtouint() in root_delay_setup()
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>
Mon, 3 Nov 2025 08:06:27 +0000 (13:36 +0530)
committerChristian Brauner <brauner@kernel.org>
Wed, 5 Nov 2025 11:49:38 +0000 (12:49 +0100)
commita6446829f841bf108fca8ca1e8f4f67b3a59d86c
tree9145b8df1fe85e2a344017995a7b313d1b11eba6
parenta4db63b88f16b8a0dae0bf1d8651f7d3c0d24072
init: Replace simple_strtoul() with kstrtouint() in root_delay_setup()

Replace deprecated simple_strtoul() with kstrtouint() for better error
handling and input validation. Return 0 on parsing failure to indicate
invalid parameter, maintaining existing behavior for valid inputs.

The simple_strtoul() function is deprecated in favor of kstrtoint()
family functions which provide better error handling and are recommended
for new code and replacements.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Link: https://patch.msgid.link/20251103080627.1844645-1-kaushlendra.kumar@intel.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
init/do_mounts.c