crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos

[ Upstream commit 05b3bade29 ]

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>
This commit is contained in:
Kai Ye 2022-01-22 17:30:42 +08:00 коммит произвёл Greg Kroah-Hartman
Родитель 4941c21090
Коммит ca97dfbda5
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -4107,7 +4107,7 @@ static void qm_vf_get_qos(struct hisi_qm *qm, u32 fun_num)
static int qm_vf_read_qos(struct hisi_qm *qm) static int qm_vf_read_qos(struct hisi_qm *qm)
{ {
int cnt = 0; int cnt = 0;
int ret; int ret = -EINVAL;
/* reset mailbox qos val */ /* reset mailbox qos val */
qm->mb_qos = 0; qm->mb_qos = 0;