]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos
authorKai Ye <yekai13@huawei.com>
Sat, 22 Jan 2022 09:30:42 +0000 (17:30 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 31 Jan 2022 00:21:45 +0000 (11:21 +1100)
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 <yekai13@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c

index c5b84a5ea3501661dfbbe8bff8aa0f185d18d993..3b29c8993b8c7bcb647168c2bff06597cb4179fe 100644 (file)
@@ -4295,7 +4295,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;