Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp210296pxb; Mon, 13 Sep 2021 17:14:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4CSmOsS8o04odIiFn470Wov1y43368zbM9L/7OXU2sdT6DpV4vIlLGWLc0Gu6zLiCM02Z X-Received: by 2002:a17:906:7855:: with SMTP id p21mr15581220ejm.330.1631578478168; Mon, 13 Sep 2021 17:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631578478; cv=none; d=google.com; s=arc-20160816; b=FqvEzn25DwzS58nDxKI+/0NufS5Tt49uLJsoONhlXvuAIit7kDvXZ5BnRT5nO3Hvde f7O+t+SiMcmEMunxVwIiMKQjZZ6k98NcDi4LTrIcqL4O31uwHyywV2v2Zk+QWtJGlZ9k Hi3Uw5c/Z9+JIYEuZ6GcF4VkchmjYGVDgDK3qZ335o+A0R/g8dSiUtQrews3kkh7Kdk/ SPkRpa67Fa/75sHZX2Q6KJCFNQAuWA/xu/emvRVHrQqFdRvwMoJNImGhv2CPxJZdo9nX aCrV4Ecy4mUrHW6rs27U+8NPp5vMj+C+Sm9bXClz9K1eN4OOKwBTEEZg+uGqsisplsLk LDRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yOtStkBPJ47i4YT38Y+/MRIalHhQpQBy0T+qORxFJ9s=; b=hoUS+gQ8kJRMVdi+oXQxRX6UQPrvKSLlaxJ4ZzJPTRG0MnaMGBDey7gEZKsV0ExI3m nn82i6t7l1GEwR2tmFyzrNOac14RXAG04VeGr85sVyWavhwlsHg1Eyd54ClW1s56/dQv VMNLjsp+a3ZOkV/fDsKhY49WLLIomPoJB4PqF/x7+BTiDyMyVDGQKdDj4MUFWtJCL+XJ /9lZky/M3q/N16I3gZmK8NuBpKUXWLR9cLX+5kFxzUgIfa65/34zShsdrYKdKBirjOgy YgTevkVKSw26nqADwYjyWmUstE+bzJEvVrjk+UnY577IVANnpooa8nHWicsSPBK8/jxf OmfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=llYIbVae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si5972006edb.415.2021.09.13.17.14.14; Mon, 13 Sep 2021 17:14:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=llYIbVae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244950AbhIMOFy (ORCPT + 99 others); Mon, 13 Sep 2021 10:05:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:49604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244770AbhIMOCk (ORCPT ); Mon, 13 Sep 2021 10:02:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 68DA661A3A; Mon, 13 Sep 2021 13:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540304; bh=6scZ+5zeyipWK3utQXmJ1QAWnXjylgomP4Y7+G7TQ9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=llYIbVaeBopG4hGEtTQ90nQAB3BupCafF4TYRO/rZsFfapFJo7PxIAZEcC3tQe8q1 yfNjcMgACK+X4X00v9HOgSa07MydL91D0eTEUvgGEI3T9s76SXhCHYNyo8pRtEwlGI D8EYatLlcQpS7veTXm/SKFDgq6vIih0eqzD2lz6E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , Leon Romanovsky , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.13 138/300] net/mlx5: Fix missing return value in mlx5_devlink_eswitch_inline_mode_set() Date: Mon, 13 Sep 2021 15:13:19 +0200 Message-Id: <20210913131114.059907079@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiapeng Chong [ Upstream commit bcd68c04c7692416206414dc8971730aa140eba7 ] The return value is missing in this code scenario, add the return value '0' to the return value 'err'. Eliminate the follow smatch warning: drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:3083 mlx5_devlink_eswitch_inline_mode_set() warn: missing error code 'err'. Reported-by: Abaci Robot Fixes: 8e0aa4bc959c ("net/mlx5: E-switch, Protect eswitch mode changes") Signed-off-by: Jiapeng Chong Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index d0e4daa55a4a..c6d3348d759e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -3074,8 +3074,11 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode, switch (MLX5_CAP_ETH(dev, wqe_inline_mode)) { case MLX5_CAP_INLINE_MODE_NOT_REQUIRED: - if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE) + if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE) { + err = 0; goto out; + } + fallthrough; case MLX5_CAP_INLINE_MODE_L2: NL_SET_ERR_MSG_MOD(extack, "Inline mode can't be set"); -- 2.30.2