Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp580356pxb; Fri, 15 Oct 2021 11:27:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR7w7SLn0E07zZEAyAftiusx33k3y6esOfGXEZUbXOtMQS9uxRcy4pLSVLIxtnOe7fR0rJ X-Received: by 2002:a17:90b:1bc3:: with SMTP id oa3mr15313824pjb.75.1634322427358; Fri, 15 Oct 2021 11:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634322427; cv=none; d=google.com; s=arc-20160816; b=M6o94macacXydWwnz1FJM3rtKxeIHO0DdOpJuaft71YnWlc73do9lvU/+/YYyUgxDL /faUOfty5mDjR8ifRHZn72gVxHrOeACG/CwK3cvpc2Wn9nr8c2drZ/iwelDDbiu8w3cM wgujKtti+rdZMGdQHwN5V/OgvCKsdCnO/vA0dledcTCai14XzlYx8DuYKyZE38JGEfwb ZJcCsSluOjqOOQnN28FkPPfK8BK/hSwlvxIQbOhI69JnG9H7HQTz9k/UjAzsYGjU8Kw3 xzq9IDtE106pNWVVlLhSL7RtX9iFB2GTC+w3legPzqBp562kVDWsiYrvx7DgQpS0BW2P tNKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=T5DEJ/oiCZybfF5VHDT76u/nYxTlh6/T3NuFcyGQ/ag=; b=Hyx7WMMxMYF8ks2X7ZnEcgcBPIzx/ljS7zygZvtR4GvFC/e2nHaUgPrLe82k/8Wxaj bwwXOjSuU5hJB7TqSt2hMYxCEOPjkhwQqIBDUsDaARrUnyzaRW1Kg+HYH3Povw9kVWRK Juj+YzQUanV7wKNX/yHr9vD1denNHlFX+5iK8vl8aBZRQ3McRMRqJ0G5tdELOrzs7j7h S/hbOSA+BoTcw2dEyxThXlblU7qG5qXYAnnbSkXQE9iU+AvFusvjRcADIqCo1dSe+AGl FBTmbj+7SAXhUB/h3JtwiOg5njbpZLrXwuy3p8FtB9neBlADCEsbg3UsSh3I9pwuNGBp rY3w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 66si7528514pfe.242.2021.10.15.11.26.53; Fri, 15 Oct 2021 11:27:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235195AbhJOKHB (ORCPT + 99 others); Fri, 15 Oct 2021 06:07:01 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:47826 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237806AbhJOKGt (ORCPT ); Fri, 15 Oct 2021 06:06:49 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Us8GmCj_1634292278; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Us8GmCj_1634292278) by smtp.aliyun-inc.com(127.0.0.1); Fri, 15 Oct 2021 18:04:41 +0800 From: Jiapeng Chong To: jesse.brandeburg@intel.com Cc: anthony.l.nguyen@intel.com, davem@davemloft.net, kuba@kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] ice: Fix missing error code in ice_ena_vfs() Date: Fri, 15 Oct 2021 18:04:09 +0800 Message-Id: <1634292249-63098-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. Eliminate the follow smatch warning: drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c:1979 ice_ena_vfs() warn: missing error code 'ret'. Reported-by: Abaci Robot Fixes: 1c54c839935b ("ice: enable/disable switchdev when managing VFs") Signed-off-by: Jiapeng Chong --- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c index 4d0b643..b2a018c 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c @@ -1975,8 +1975,10 @@ static int ice_ena_vfs(struct ice_pf *pf, u16 num_vfs) clear_bit(ICE_VF_DIS, pf->state); - if (ice_eswitch_configure(pf)) + if (ice_eswitch_configure(pf)) { + ret = -EINVAL; goto err_unroll_sriov; + } return 0; -- 1.8.3.1