lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net/mlx5e: Fix missing error code in mlx5e_rx_reporter_err_icosq_cqe_recover()
Date
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'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
index 2684e9da9f41..ceb21573db6c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
@@ -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)
--
2.20.1.7.g153144c
\
 
 \ /
  Last update: 2022-01-05 16:19    [W:0.090 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site