Skip to content

Commit c5705a2

Browse files
harshimogalapalliPaolo Abeni
authored andcommitted
Octeontx2-af: Fix missing error code in cgx_probe()
When CGX fails mapping to NIX, set the error code to -ENODEV, currently err is zero and that is treated as success path. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/aLAdlCg2_Yv7Y-3h@stanley.mountain/ Fixes: d280233 ("Octeontx2-af: Fix NIX X2P calibration failures") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20251010204239.94237-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 2616222 commit c5705a2

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,7 @@ static int cgx_probe(struct pci_dev *pdev, const struct pci_device_id *id)
19811981
!is_cgx_mapped_to_nix(pdev->subsystem_device, cgx->cgx_id)) {
19821982
dev_notice(dev, "CGX %d not mapped to NIX, skipping probe\n",
19831983
cgx->cgx_id);
1984+
err = -ENODEV;
19841985
goto err_release_regions;
19851986
}
19861987

0 commit comments

Comments
 (0)