ctx params uninit should be after ctx params init.
Signed-off-by: Wenkai Lin linwenkai6@hisilicon.com --- wd_rsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wd_rsa.c b/wd_rsa.c index 8ead706..21f80e7 100644 --- a/wd_rsa.c +++ b/wd_rsa.c @@ -296,7 +296,6 @@ int wd_rsa_init2_(char *alg, __u32 sched_type, int task_type, struct wd_ctx_para if (ret == -WD_EAGAIN) { wd_disable_drv(wd_rsa_setting.driver); wd_alg_drv_unbind(wd_rsa_setting.driver); - wd_ctx_param_uninit(&rsa_ctx_params); continue; } goto out_driver; @@ -313,6 +312,7 @@ int wd_rsa_init2_(char *alg, __u32 sched_type, int task_type, struct wd_ctx_para if (ret == -WD_ENODEV) { wd_disable_drv(wd_rsa_setting.driver); wd_alg_drv_unbind(wd_rsa_setting.driver); + wd_ctx_param_uninit(&rsa_ctx_params); continue; } WD_ERR("failed to init alg attrs!\n");