crypto: octeontx2 - Fix cptvf driver cleanup
[platform/kernel/linux-starfive.git] / drivers / crypto / marvell / octeontx2 / otx2_cptvf_main.c
index bac729c..215a1b1 100644 (file)
@@ -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)