firmware: imx-dsp: Fix an error handling path in imx_dsp_setup_channels()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 15 Jan 2023 18:13:46 +0000 (19:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:48 +0000 (14:56 +0200)
commit7cad56459964855a2e5b9ab3f4471e64a8de8dc4
tree19d1c2ce74a0fdd1130e8a533f472d08112630fb
parent33ed60d8b961fca23a96f3a2f0c7c142c6ec5455
firmware: imx-dsp: Fix an error handling path in imx_dsp_setup_channels()

[ Upstream commit e527adfb9b7d9d05a4577c116519e59a2bda4b05 ]

If mbox_request_channel_byname() fails, the memory allocated a few lines
above still need to be freed before going to the error handling path.

Fixes: 046326989a18 ("firmware: imx: Save channel name for further use")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/imx/imx-dsp.c