lkml.org 
[lkml]   [2022]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.16 0753/1017] crypto: hisilicon/qm - cleanup warning in qm_vf_read_qos
    Date
    From: Kai Ye <yekai13@huawei.com>

    [ 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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
    index 1dc6a27ba0e0..82d2b117e162 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;
    --
    2.34.1


    \
     
     \ /
      Last update: 2022-04-05 15:43    [W:2.336 / U:0.892 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site