summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec/errors.rs
diff options
context:
space:
mode:
authorSajal Gupta <sajal2005gupta@gmail.com>2026-05-09 15:21:48 +0530
committerJakub Kicinski <kuba@kernel.org>2026-05-13 18:06:56 -0700
commit1f8fd0fe56412db6a1a84317ce5856bdbef1fca3 (patch)
tree1e12897c0ca1fa98e6c3f89d5dbc9cfd57741455 /rust/kernel/alloc/kvec/errors.rs
parentd0273dbe8be1640e597552f81faf1d6c9997d3e3 (diff)
net: usb: pegasus: replace simple_strtoul with kstrtouint
simple_strtoul() is deprecated as it has no error checking. Replace it with kstrtouint() which returns an error code on invalid input, and add appropriate error handling. Also add a NULL check before parsing flags, since strsep() can set id to NULL if the input has fewer tokens than expected. Preserve the original behavior for a trailing colon by checking *id before parsing flags, so an empty string results in flags = 0 rather than an error. Signed-off-by: Sajal Gupta <sajal2005gupta@gmail.com> Link: https://patch.msgid.link/20260509095518.2640-1-sajal2005gupta@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions