summaryrefslogtreecommitdiff
path: root/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
diff options
context:
space:
mode:
authorBharat Bhushan <bbhushan2@marvell.com>2023-12-11 13:29:11 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-12-15 12:52:54 +0300
commitc480a421a4faf693c38e60b0fe6e554c9a3fee02 (patch)
treee4ffc73f98387e7d169f3359852aa36464de77cf /drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
parent9d7edaae7c1fbbc4d34124d41ac846a8b9ba5359 (diff)
downloadlinux-c480a421a4faf693c38e60b0fe6e554c9a3fee02.tar.xz
crypto: octeontx2 - Fix cptvf driver cleanup
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>
Diffstat (limited to 'drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c')
-rw-r--r--drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
index 69a447d3702c..7358fa656a5e 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
@@ -249,8 +249,11 @@ static void cptvf_lf_shutdown(struct otx2_cptlfs_info *lfs)
otx2_cptlf_unregister_interrupts(lfs);
/* Cleanup LFs software side */
lf_sw_cleanup(lfs);
+ /* Free instruction queues */
+ otx2_cpt_free_instruction_queues(lfs);
/* Send request to detach LFs */
otx2_cpt_detach_rsrcs_msg(lfs);
+ lfs->lfs_num = 0;
}
static int cptvf_lf_init(struct otx2_cptvf_dev *cptvf)