Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp205440pxb; Thu, 2 Sep 2021 23:43:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaP3E5h6sueJdyLLxI+SH0YSDybxyXrQKJwSi61Mb9LMN2DC2uOJS43HWcLmS3t2bw9bfa X-Received: by 2002:a92:d2cd:: with SMTP id w13mr1515600ilg.117.1630651425612; Thu, 02 Sep 2021 23:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630651425; cv=none; d=google.com; s=arc-20160816; b=ssnAP4MY0HEm27Ol4YcUYNdZT2txTFMWRGvlmE8lPo32xCrGjTVQWkgVtnxE2YtWw1 vlVuYOKGVKbkUZfSKz8iVk5D57kydV1SNy723xVp9zIEb0cPXdFKw9DxtU42gGBPkjOJ QPcYZ0l3+NyHa7zkhISrc/2ReiCZFHBectW1tvwPMGudFCqeHcCHoXkluLCkz326vxbc XDYOUE0G21wY2v0JXFAtAzhZRebDQ12Dl0QYsLOFkfc4whLwkoePCQ5V/M/p5C0hag9p MGJRvB5gL72o8Zij2BEeNKaTiPSxdpU+o1aHbufyvSbcgCJD28RxrmNRLa4hQCATRAqm zHsg== 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=Sl8qCuQMFdn0GDdPDwsPv0zjEpJtyFzVP6h3qtYTu7I=; b=nB+N2bB2nZBXrKT7aycuGys4LyKiCKIJRKBdeiSnS0cHGX+cFigdMZFiEweAXrUOAj +24pxcoLeB81EhQkJfnZhgoWoF52/UaERPjen1rClitt+AQSnqljiqgeA8em1ltM7aHk dQbXFzlFyhPHt6IDIeqExwfWkTQ5HnP5Y3f0jytx9qe2BZzaoFLj63cqLV36nxQ5Ao5q f3W4eCZf1lUklYoA54/C3E3UJxE+I3knNXws3d6d1bYbjJmvviT4OTqWP5+dIBEx5d+h DZN8NsxQ/RNs8wEhKKGkkr0jVYkOBTsKY01pCD3PJ6BjQRRJUM0PS6631sIDX7XK4T1v 6vYw== 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 r6si4511730ilb.145.2021.09.02.23.43.34; Thu, 02 Sep 2021 23:43:45 -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 S1346781AbhICGnj (ORCPT + 99 others); Fri, 3 Sep 2021 02:43:39 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:41440 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232218AbhICGnj (ORCPT ); Fri, 3 Sep 2021 02:43:39 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R421e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Un4Z0u7_1630651356; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Un4Z0u7_1630651356) by smtp.aliyun-inc.com(127.0.0.1); Fri, 03 Sep 2021 14:42:37 +0800 From: Yang Li To: davem@davemloft.net Cc: kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] ethtool: Fix an error code in cxgb2.c Date: Fri, 3 Sep 2021 14:42:33 +0800 Message-Id: <1630651353-22077-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When adapter->registered_device_map is NULL, the value of err is uncertain, we set err to -EINVAL to avoid ambiguity. Clean up smatch warning: drivers/net/ethernet/chelsio/cxgb/cxgb2.c:1114 init_one() warn: missing error code 'err' Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c index 73c0161..d246eee 100644 --- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c +++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c @@ -1111,6 +1111,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (!adapter->registered_device_map) { pr_err("%s: could not register any net devices\n", pci_name(pdev)); + err = -EINVAL; goto out_release_adapter_res; } -- 1.8.3.1