crypto: octeontx2 - Fix cptvf driver cleanup
authorBharat Bhushan <bbhushan2@marvell.com>
Mon, 11 Dec 2023 10:29:11 +0000 (15:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:16 +0000 (20:14 +0000)
commit8b18d5f5454e044228f5093ae932333753f00e67
tree39fe9ae943e54741e411b2d491012551f01dbe17
parentc7ff77b7db34ce366a41df1b986026386d2c6281
crypto: octeontx2 - Fix cptvf driver cleanup

[ Upstream commit c480a421a4faf693c38e60b0fe6e554c9a3fee02 ]

This patch fixes following cleanup issues:
 - Missing instruction queue free on cleanup. This
   will lead to memory leak.
 - lfs->lfs_num is set to zero before cleanup, which
   will lead to improper cleanup.

Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/marvell/octeontx2/otx2_cptlf.c
drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c