linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] octeontx2-af: returning uninitialized variable
@ 2022-07-13  7:38 Sebin Sebastian
  2022-07-13 14:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Sebin Sebastian @ 2022-07-13  7:38 UTC (permalink / raw)
  Cc: Sebin Sebastian, Sunil Goutham, Linu Cherian, Geetha sowjanya,
	Jerin Jacob, hariprasad, Subbaraya Sundeep, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] octeontx2-af: returning uninitialized variable
  2022-07-13  7:38 [PATCH -next] octeontx2-af: returning uninitialized variable Sebin Sebastian
@ 2022-07-13 14:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-13 14:00 UTC (permalink / raw)
  To: Sebin Sebastian
  Cc: sgoutham, lcherian, gakula, jerinj, hkelam, sbhatta, davem,
	edumazet, kuba, pabeni, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Wed, 13 Jul 2022 13:08:58 +0530 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [-next] octeontx2-af: returning uninitialized variable
    https://git.kernel.org/netdev/net-next/c/6a605eb1d71e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-13 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13  7:38 [PATCH -next] octeontx2-af: returning uninitialized variable Sebin Sebastian
2022-07-13 14:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).