mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 01:13:11 +00:00
Replace deprecated simple_strtol() calls with kstrtoint() in timeout_store() and firmware_loading_store() functions to improve input validation and error handling. The simple_strtol() function does not provide proper error checking for invalid input, while kstrtoint() returns an error for malformed strings. This change adds proper validation for user input from sysfs attributes, returning -EINVAL for invalid numeric strings instead of silently accepting potentially malformed input. The behavior for valid numeric input remains unchanged. The simple_strtol() 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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>