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

Conor Dooley conor at kernel.org
Thu May 14 13:04:12 PDT 2026


From: Conor Dooley <conor.dooley at microchip.com>

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.



More information about the linux-riscv mailing list