summaryrefslogtreecommitdiff
path: root/rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorMa Ke <make24@iscas.ac.cn>2026-04-24 09:10:13 +0800
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-06-03 22:00:37 +0200
commita2c14ff63e0e02e3c832385e523e9cc81301171c (patch)
tree90c635e2ccce68ebc70cf141560489ede87835f2 /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
parent68d234144b7dffd1f50b07ba74d0d6e833ef43a4 (diff)
power: supply: cpcap-battery: Fix missing nvmem_device_put() causing reference leak
In cpcap_battery_detect_battery_type(), the reference to an nvmem device obtained via nvmem_device_find() is not released with nvmem_device_put() on the success or read-failure paths, causing a permanent reference leak. The driver’s retry logic on subsequent battery property reads can compound this leak, preventing the nvmem device from ever being freed. Found by code review. Signed-off-by: Ma Ke <make24@iscas.ac.cn> Cc: stable@vger.kernel.org Fixes: fd46821e85de ("power: supply: cpcap-battery: Add battery type auto detection for mapphone devices") Link: https://patch.msgid.link/20260424011013.879639-1-make24@iscas.ac.cn Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions