From patchwork Fri Mar 24 02:55:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 13186361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB8F2C6FD1C for ; Fri, 24 Mar 2023 02:56:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbjCXC4H (ORCPT ); Thu, 23 Mar 2023 22:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbjCXC4E (ORCPT ); Thu, 23 Mar 2023 22:56:04 -0400 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82162FF24; Thu, 23 Mar 2023 19:55:55 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0VeWDAvu_1679626549; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VeWDAvu_1679626549) by smtp.aliyun-inc.com; Fri, 24 Mar 2023 10:55:52 +0800 From: Jiapeng Chong To: saeedm@nvidia.com Cc: leon@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH 2/2] net/mlx5e: Fix missing error code in mlx5e_rx_reporter_err_icosq_cqe_recover() Date: Fri, 24 Mar 2023 10:55:41 +0800 Message-Id: <20230324025541.38458-2-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c In-Reply-To: <20230324025541.38458-1-jiapeng.chong@linux.alibaba.com> References: <20230324025541.38458-1-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'. drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c:105 mlx5e_tx_reporter_err_cqe_recover() warn: missing error code 'err'. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4600 Signed-off-by: Jiapeng Chong Reviewed-by: Steen Hegelund --- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c index 44c1926843a1..5e2e2449668d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c @@ -101,8 +101,10 @@ static int mlx5e_tx_reporter_err_cqe_recover(void *ctx) goto out; } - if (state != MLX5_SQC_STATE_ERR) + if (state != MLX5_SQC_STATE_ERR) { + err = -EINVAL; goto out; + } mlx5e_tx_disable_queue(sq->txq);