]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()
authorAleksandr Mishin <amishin@t-argos.ru>
Fri, 5 Jul 2024 09:53:17 +0000 (12:53 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 9 Jul 2024 10:48:32 +0000 (12:48 +0200)
In rvu_check_rsrc_availability() in case of invalid SSOW req, an incorrect
data is printed to error log. 'req->sso' value is printed instead of
'req->ssow'. Looks like "copy-paste" mistake.

Fix this mistake by replacing 'req->sso' with 'req->ssow'.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 746ea74241fa ("octeontx2-af: Add RVU block LF provisioning support")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240705095317.12640-1-amishin@t-argos.ru
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeontx2/af/rvu.c

index ff78251f92d4480a72f9c1ce0c268bf8aaa76f4f..5f661e67ccbcf11af3552398d379f4d2bd6a017f 100644 (file)
@@ -1643,7 +1643,7 @@ static int rvu_check_rsrc_availability(struct rvu *rvu,
                if (req->ssow > block->lf.max) {
                        dev_err(&rvu->pdev->dev,
                                "Func 0x%x: Invalid SSOW req, %d > max %d\n",
-                                pcifunc, req->sso, block->lf.max);
+                                pcifunc, req->ssow, block->lf.max);
                        return -EINVAL;
                }
                mappedlfs = rvu_get_rsrc_mapcount(pfvf, block->addr);