Skip to content

Commit f3d671c

Browse files
Dan CarpenterPaolo Abeni
authored andcommitted
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: ecad2ce ("octeontx2-af: cn10k: Add mailbox to configure reassembly timeout") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YpXDrTPb8qV01JSP@kili Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent c4caa50 commit f3d671c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/marvell/octeontx2/af

drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static bool is_valid_offset(struct rvu *rvu, struct cpt_rd_wr_reg_msg *req)
579579

580580
blkaddr = validate_and_get_cpt_blkaddr(req->blkaddr);
581581
if (blkaddr < 0)
582-
return blkaddr;
582+
return false;
583583

584584
/* Registers that can be accessed from PF/VF */
585585
if ((offset & 0xFF000) == CPT_AF_LFX_CTL(0) ||

0 commit comments

Comments
 (0)