summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator.rs
diff options
context:
space:
mode:
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>2025-08-28 12:00:00 +0530
committerShuah Khan <skhan@linuxfoundation.org>2025-09-16 16:21:50 -0600
commit57b100d4cf14276e0340eecb561005c07c129eb8 (patch)
tree62055f7ef1615efbf52a93a10488fade863eb33d /rust/kernel/alloc/allocator.rs
parentf83ec76bf285bea5727f478a68b894f5543ca76e (diff)
tools/cpupower: fix error return value in cpupower_write_sysfs()
The cpupower_write_sysfs() function currently returns -1 on write failure, but the function signature indicates it should return an unsigned int. Returning -1 from an unsigned function results in a large positive value rather than indicating an error condition. Fix this by returning 0 on failure, which is more appropriate for an unsigned return type and maintains consistency with typical success/failure semantics where 0 indicates failure and non-zero indicates success (bytes written). Link: https://lore.kernel.org/r/20250828063000.803229-1-kaushlendra.kumar@intel.com Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/alloc/allocator.rs')
0 files changed, 0 insertions, 0 deletions