Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp84389pxb; Mon, 13 Sep 2021 13:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsfwmohZREwwVlZZtES1dCWyp1VWn2u9UTAN8lVugGBWrQ0Mm+fgSJIXgeeK6U9MMofdsi X-Received: by 2002:a17:906:c9c2:: with SMTP id hk2mr15084076ejb.328.1631565379953; Mon, 13 Sep 2021 13:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631565379; cv=none; d=google.com; s=arc-20160816; b=PrK7mXe8Rpg0TM3n84Oxcxutp3IeDaLydDMqka3eFngI38Ws1Lsvz7RF/ZlbSer1vu AVmBNS0ptl83JO1qhRU+CGtUaBsUuT8IO826sIARUKXD5/Nc51vbY+nb1cctiqp/2Wte PsLk+ZYJSA/f7GJMs85sp8blkv9EUHbLyQHAD4vGdIEdjJbJPBIfKZOKE/shZwYsl9sy UsEG6AgBsVnDSU6tHX43NvGVkIuOeVCsCpXx14Pgz/z+vBPzn16hLdTVA0pRxNWjppk0 PqYSQv25XWPKbf0tvYkG42Am/BJReniMzxBPxNZxAJouyMbSdAAE0zxElJtMymgAKRX9 5F+w== 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=q7HBtLoWtkGpen3BWOOkvjTzWYAqjlC1PNUavGRoFQ0=; b=b9qRSW3le7SVtz6kU/b94B9k01QBdT7vPAP6Nj3VHhRnfxq/p3uFcsclAlS3310k7N GChDllV45kFSiHJa1Gae34A9d3n2xkDUJg/VILVNArXqiCEpWDSq/8CrvxeDt556n2Pb tfPbXcDzvYkwnD9k5Iru0ABx1ANcanDc0Q1oBjlZ0uv+qaoS3MYfeWI9WG+f+TeWk67K cabfDklfVxjpp2+07Ag6o6fjhNJXl4tmyTe/f9Xg9RBJTWSOgCBoSo7seZCjYTQ9dUA/ jAFS7vtTBNGlIi2roglDvMjac4dSq2j+CMbP+pyKnZEemtO7fcSVIVjytuWVMCAztsHu QCzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZIooDe4k; 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 hp8si9100847ejc.107.2021.09.13.13.35.55; Mon, 13 Sep 2021 13:36:19 -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=ZIooDe4k; 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 S241359AbhIMNmg (ORCPT + 99 others); Mon, 13 Sep 2021 09:42:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:34490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242587AbhIMNhE (ORCPT ); Mon, 13 Sep 2021 09:37:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0C082613B5; Mon, 13 Sep 2021 13:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539684; bh=8ZFq0P4uSnbs5pO61q0/HA9FfOLY+VQJhwTIpNcgcyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZIooDe4kc4zebaJyKGlC/fzhLnKmLOzuEy1QNCP0fyqne6/Q7EOlqqDGEudLUkcUu 2vuXK2ifybAiQF9vCCzxfQoBI6x6Q07R8SIjNTcjQiIMHfea1cWK/OFBPMThYrjIZ+ mLS5DvnAnkkfx29cgBVp3bkXF9OeD5DLRsbJWyCo= 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.10 119/236] net/mlx5: Fix missing return value in mlx5_devlink_eswitch_inline_mode_set() Date: Mon, 13 Sep 2021 15:13:44 +0200 Message-Id: <20210913131104.405640066@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 c9c2962ad49f..5801f55ff077 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -2564,8 +2564,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