Re: [PATCH] Octeontx2-af: Fix missing error code in cgx_probe()

From: Simon Horman

Date: Mon Oct 13 2025 - 05:23:32 EST


On Fri, Oct 10, 2025 at 01:42:39PM -0700, Harshit Mogalapalli wrote:
> 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@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/aLAdlCg2_Yv7Y-3h@stanley.mountain/
> Fixes: d280233fc866 ("Octeontx2-af: Fix NIX X2P calibration failures")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
> ---
> This is based on static analysis with smatch and only compile tested.

Thanks,

I agree that Smatch is onto something here.

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>