Re: [PATCH] power: supply: cpcap-battery: Fix missing nvmem_device_put() causing reference leak

From: Sebastian Reichel

Date: Wed Jun 03 2026 - 16:52:10 EST



On Fri, 24 Apr 2026 09:10:13 +0800, Ma Ke wrote:
> 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.
>
> [...]

Applied, thanks!

[1/1] power: supply: cpcap-battery: Fix missing nvmem_device_put() causing reference leak
commit: a2c14ff63e0e02e3c832385e523e9cc81301171c

Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>