]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:06:32 +0000 (14:06 +0200)
[ 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 <yekai13@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/hisilicon/qm.c

index 1dc6a27ba0e0d4251d5c4d04bd72c08502daf430..82d2b117e1623a7d438568849454621a29860673 100644 (file)
@@ -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;