Re: [PATCH 05/10] power: supply: ab8500_btemp: Remove unused global device list

From: Linus Walleij

Date: Thu Dec 03 2026 - 18:56:35 EST


On Thu, Dec 3, 2026 at 5:13 PM Lee Jones <lee@xxxxxxxxxx> wrote:

> ab8500_btemp_probe() links the devm-allocated device structure into the
> static ab8500_btemp_list without ever removing it on probe failure or
> unbind. A subsequent rebind traverses the freed list node and corrupts
> memory.
>
> Since ab8500_btemp_list has had no readers since BATCTRL thermal mode
> was removed, delete the unused list and its node field altogether.
>
> Fixes: 1f855824757e ("ab8500-btemp: AB8500 battery temperature driver")
> Closes: https://sashiko.dev/#/bug/linux-1b556e1a-3976-4c4b-a368-b92b6f64cc8b
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>

Good find!
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij