lkml.org 
[lkml]   [2022]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] octeontx2-af: returning uninitialized variable
Date
Fix coverity error 'use of uninitialized variable'. err is uninitialized
and is returned which can lead to unintended results. err has been replaced
with -einval.
Coverity issue: 1518921 (uninitialized scalar variable)

Signed-off-by: Sebin Sebastian <mailmesebin00@gmail.com>
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
index ed8b9afbf731..563bf1497fd0 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
@@ -1961,7 +1961,7 @@ int rvu_npc_exact_init(struct rvu *rvu)
dev_err(rvu->dev,
"%s: failed to set drop info for cgx=%d, lmac=%d, chan=%llx\n",
__func__, cgx_id, lmac_id, chan_val);
- return err;
+ return -EINVAL;
}

err = npc_install_mcam_drop_rule(rvu, *drop_mcam_idx,
--
2.34.1
\
 
 \ /
  Last update: 2022-07-13 09:39    [W:0.049 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site