Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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")
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>

authored by

Dan Carpenter and committed by
Paolo Abeni
f3d671c7 c4caa500

+1 -1
+1 -1
drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
··· 579 579 580 580 blkaddr = validate_and_get_cpt_blkaddr(req->blkaddr); 581 581 if (blkaddr < 0) 582 - return blkaddr; 582 + return false; 583 583 584 584 /* Registers that can be accessed from PF/VF */ 585 585 if ((offset & 0xFF000) == CPT_AF_LFX_CTL(0) ||