]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 8 Nov 2024 17:22:27 +0000 (18:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:50:45 +0000 (19:50 +0100)
commitda7e49db34c56ae0f69fdb4b2f0e3a8bd966fe95
treeb2c17331911e4f376caf3d3ace4bf4a91797bc12
parent4ea3e3b761e371102bb1486778e2f8dbc9e37413
crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()

[ Upstream commit 572b7cf08403b6c67dfe0dc3e0f2efb42443254f ]

If do_cpt_init() fails, a previous dma_alloc_coherent() call needs to be
undone.

Add the needed dma_free_coherent() before returning.

Fixes: 9e2c7d99941d ("crypto: cavium - Add Support for Octeon-tx CPT Engine")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/cavium/cpt/cptpf_main.c