Re: [PATCH] soc: microchip: mpfs-sys-controller: put the flash device reference
From: Conor Dooley
Date: Thu Nov 05 2026 - 13:41:39 EST
From: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
On Wed, 04 Nov 2026 02:14:35 +0000, Wentao Liang wrote:
> of_get_mtd_device_by_node() returns an mtd_info with a reference taken
> on the MTD device, which is stored in sys_controller->flash. The
> reference is never released, neither when the last sys_controller user
> goes away nor on the probe error path that frees a freshly allocated
> controller without initialising the kref.
>
> Balance it with put_mtd_device() in both places.
>
> [...]
Applied to riscv-soc-fixes, thanks!
[1/1] soc: microchip: mpfs-sys-controller: put the flash device reference
https://git.kernel.org/conor/c/6fdd47bf3736
Thanks,
Conor.