Re: [PATCH] soc: microchip: mpfs-sys-controller: fix resource leak on probe error

From: Conor Dooley

Date: Thu May 14 2026 - 16:04:26 EST


From: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>

On Wed, 06 May 2026 19:29:02 +0800, Felix Gu wrote:
> In mpfs_sys_controller_probe(), when device_get_match_data() returns
> NULL, it returns -EINVAL directly without freeing the mbox channel
> or the allocated sys_controller memory, causing a resource leak.

Applied to riscv-soc-fixes, thanks!

[1/1] soc: microchip: mpfs-sys-controller: fix resource leak on probe error
https://git.kernel.org/conor/c/75ef23397558

Thanks,
Conor.