net: ethernet: marvell: octeontx2: Fix uninitialized variable warning
authorAnuradha Weeraman <anuradha@debian.org>
Sun, 25 Dec 2022 17:42:22 +0000 (23:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:30 +0000 (07:24 +0100)
[ Upstream commit d3805695fe1e7383517903715cefc9bbdcffdc90 ]

Fix for uninitialized variable warning.

Addresses-Coverity: ("Uninitialized scalar variable")
Signed-off-by: Anuradha Weeraman <anuradha@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c

index fa8029a..eb25e45 100644 (file)
@@ -589,7 +589,7 @@ int rvu_mbox_handler_mcs_free_resources(struct rvu *rvu,
        u16 pcifunc = req->hdr.pcifunc;
        struct mcs_rsrc_map *map;
        struct mcs *mcs;
-       int rc;
+       int rc = 0;
 
        if (req->mcs_id >= rvu->mcs_blk_cnt)
                return MCS_AF_ERR_INVALID_MCSID;