]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: imx: scu-irq: Free mailbox client on failure at imx_scu_enable_general_irq_...
authorPeng Fan <peng.fan@nxp.com>
Fri, 17 Oct 2025 01:56:25 +0000 (09:56 +0800)
committerShawn Guo <shawnguo@kernel.org>
Mon, 27 Oct 2025 06:43:47 +0000 (14:43 +0800)
commit62c740fb11ea7790f6bcd4f72c563f9ae2a42e9a
tree8bd3a8c7dd73afd65539109324ba85532c2ddbd5
parentee67247843a2b62d1473cfa4df300e69b5190ccf
firmware: imx: scu-irq: Free mailbox client on failure at imx_scu_enable_general_irq_channel()

The IRQ mailbox is an optional channel and does not need to be kept until
driver removal when an error occurs. Free the allocated memory in the
error path.

Add 'goto free_cl' when mbox_request_channel_byname() fails, to keep free
at one place.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/firmware/imx/imx-scu-irq.c