net/mlx5e: Fix missing error code in mlx5e_rx_reporter_err_icosq_cqe_recover()
Subsystems (4)
PATCH 1/1 net/mlx5e: Fix missing error code in mlx5e_rx_reporter_err_icosq_cqe_recover()
The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'.
Eliminate the follow smatch warning:
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:91 mlx5e_rx_reporter_err_icosq_cqe_recover() warn: missing error code 'err'.
--- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +3 -1
@@ -87,8 +87,10 @@ static int mlx5e_rx_reporter_err_icosq_cqe_recover(void *ctx) goto out; } -if (state !=MLX5_SQC_STATE_ERR ) +if (state !=MLX5_SQC_STATE_ERR ) { + err = -EINVAL ; goto out; + }mlx5e_deactivate_rq (rq);if (xskrq)
Signature · 1 line
2.20.1.7.g153144c
Quoted 9 lines · Jiapeng Chong
The error code is missing in this code scenario, add the error code '
-EINVAL' to the return value 'err'.Eliminate the follow smatch warning:
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:91mlx5e_rx_reporter_err_icosq_cqe_recover()warn: missing error code 'err'.
error code is not missing, err is equal to 0 at this point and the code aborts with err = 0 as intended. False alarm. nack.