Commit f3d671c7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Paolo Abeni

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: ecad2ce8 ("octeontx2-af: cn10k: Add mailbox to configure reassembly timeout")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YpXDrTPb8qV01JSP@kiliSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent c4caa500
...@@ -579,7 +579,7 @@ static bool is_valid_offset(struct rvu *rvu, struct cpt_rd_wr_reg_msg *req) ...@@ -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); blkaddr = validate_and_get_cpt_blkaddr(req->blkaddr);
if (blkaddr < 0) if (blkaddr < 0)
return blkaddr; return false;
/* Registers that can be accessed from PF/VF */ /* Registers that can be accessed from PF/VF */
if ((offset & 0xFF000) == CPT_AF_LFX_CTL(0) || if ((offset & 0xFF000) == CPT_AF_LFX_CTL(0) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment