DORMANTno replies

[PATCH] crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos

From: Kai Ye <hidden>
Date: 2021-12-22 02:13:09
Also in: lkml
Subsystem: crypto api, hisilicon qm driver, the rest · Maintainers: Herbert Xu, "David S. Miller", Weili Qian, Zhou Wang, Linus Torvalds

The kernel test rebot report this warning: Uninitialized variable: ret.
Here is fix it.

Signed-off-by: Kai Ye <redacted>
---
 drivers/crypto/hisilicon/qm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index b1fe9c7b8cc8..c6e9ad2041c3 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -4279,8 +4279,7 @@ static void qm_vf_get_qos(struct hisi_qm *qm, u32 fun_num)
 
 static int qm_vf_read_qos(struct hisi_qm *qm)
 {
-	int cnt = 0;
-	int ret;
+	int cnt = 0, ret = 0;
 
 	/* reset mailbox qos val */
 	qm->mb_qos = 0;
-- 
2.33.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help