diff mbox series

[-next] octeontx2-af: fix error return code in rvu_npc_exact_init()

Message ID 20220713095600.3377927-1-yangyingliang@huawei.com (mailing list archive)
State Accepted
Commit 6a605eb1d71ea8cec50bdf7151c772c599a5fb70
Delegated to: Netdev Maintainers
Headers show
Series [-next] octeontx2-af: fix error return code in rvu_npc_exact_init() | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 8 maintainers not CCed: hkelam@marvell.com pabeni@redhat.com sbhatta@marvell.com kuba@kernel.org edumazet@google.com lcherian@marvell.com gakula@marvell.com jerinj@marvell.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Yang Yingliang July 13, 2022, 9:56 a.m. UTC
If rvu_npc_exact_save_drop_rule_chan_and_mask() returns false,
the 'err' is uninitialized, return -EINVAL instead.

Fixes: c6238bc0614d ("octeontx2-af: Drop rules for NPC MCAM")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org July 13, 2022, 2 p.m. UTC | #1
Hello:

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

On Wed, 13 Jul 2022 17:56:00 +0800 you wrote:
> If rvu_npc_exact_save_drop_rule_chan_and_mask() returns false,
> the 'err' is uninitialized, return -EINVAL instead.
> 
> Fixes: c6238bc0614d ("octeontx2-af: Drop rules for NPC MCAM")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> 
> [...]

Here is the summary with links:
  - [-next] octeontx2-af: fix error return code in rvu_npc_exact_init()
    https://git.kernel.org/netdev/net-next/c/6a605eb1d71e

You are awesome, thank you!
diff mbox series

Patch

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,