Skip to contentSkip to conversation

octeontx2-af: fix error code in is_valid_offset()

PATCH Applied Dan Carpenter 2 participants 2 messages May 31, 2022 – Jun 1, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 octeontx2-af: fix error code in is_valid_offset()

The is_valid_offset() function returns success/true if the call to validate_and_get_cpt_blkaddr() fails.

Fixes ecad2ce8c48f ("octeontx2-af: cn10k: Add mailbox to configure reassembly timeout")
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c +1 -1
index a79201a9a6f0..a9da85e418a4 100644
@@ -579,7 +579,7 @@ static bool is_valid_offset(struct rvu *rvu, struct cpt_rd_wr_reg_msg *req)
 
 	blkaddr = validate_and_get_cpt_blkaddr(req->blkaddr);
 	if (blkaddr < 0)
-		return blkaddr;
+		return false;
 
 	/* Registers that can be accessed from PF/VF */
 	if ((offset & 0xFF000) ==  CPT_AF_LFX_CTL(0) ||
Signature · 1 line
2.35.1
#1 lore raw
This patch was applied to netdev/net.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Tue, 31 May 2022 10:28:45 +0300 you wrote:

The is_valid_offset() function returns success/true if the call to validate_and_get_cpt_blkaddr() fails.

Fixes ecad2ce8c48f ("octeontx2-af: cn10k: Add mailbox to configure reassembly timeout")
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [net] octeontx2-af: fix error code in is_valid_offset()

    https://git.kernel.org/netdev/net/c/f3d671c71109

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html