summaryrefslogtreecommitdiff
path: root/rust/kernel/interop/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorLucas Zampieri <lcasmz54@gmail.com>2026-03-14 01:05:28 +0000
committerBenjamin Tissoires <bentiss@kernel.org>2026-03-19 15:52:45 +0100
commit5a9df498581a2e12fd960ddeb1da41dd771d9000 (patch)
tree973fabfb114137e3bcf560ac308ac0324b525913 /rust/kernel/interop/git@git.tavy.me:linux-stable.git
parent142068281f5138a9888d488e6911e8d9f7923c15 (diff)
HID: input: Convert battery code to devm_*
Convert the HID battery code to use devm_* managed resource APIs for the power_supply_desc allocation, battery name string, and power supply registration. The error path uses devm_kfree() to clean up allocated memory if devm_power_supply_register() fails, preventing memory waste on repeated setup attempts. The hidinput_cleanup_battery() function is removed as devm handles cleanup automatically. Signed-off-by: Lucas Zampieri <lcasmz54@gmail.com> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions