From 26406484d65db093e24dd230ad544ed027e6722f Mon Sep 17 00:00:00 2001
From: Wenkai Lin <linwenkai6@hisilicon.com>
Date: Sun, 24 Apr 2022 09:54:28 +0800
Subject: [PATCH 122/183] uadk: fix ret uninit problem

If switch go out with default branch, it return
random value.

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 ca39cff..b7f250e 100644
--- a/wd_rsa.c
+++ b/wd_rsa.c
@@ -1007,7 +1007,7 @@ static int rsa_prikey2_param_set(struct wd_rsa_prikey2 *pkey2,
 				 struct wd_dtb *param,
 				 enum wd_rsa_crt_prikey_para type)
 {
-	int ret;
+	int ret = -WD_EINVAL;
 
 	if (param->dsize > pkey2->key_size || !param->data)
 		return -WD_EINVAL;
-- 
2.27.0

