From: Kai Ye Date: Sat, 22 Jan 2022 09:30:42 +0000 (+0800) Subject: crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos X-Git-Tag: v5.16.19~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ff4b3bf5990487a2954fe7897c9f49467cedfc1;p=thirdparty%2Fkernel%2Fstable.git crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos [ Upstream commit 05b3bade290d6c940701f97f3233c07cfe27205d ] The kernel test rebot report this warning: Uninitialized variable: ret. The code flow may return value of ret directly. This value is an uninitialized variable, here is fix it. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 1dc6a27ba0e0d..82d2b117e1623 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -4145,7 +4145,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 ret = -EINVAL; /* reset mailbox qos val */ qm->mb_qos = 0;