Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2351123pxb; Mon, 20 Sep 2021 19:46:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx89X6bfyNQS7ysZ76uLdwBNkKyW95o1IqEJ6niQ+OHdxw3pqofiku5q2WUwrle2tkWh8Op X-Received: by 2002:a50:bf02:: with SMTP id f2mr19977541edk.98.1632192406242; Mon, 20 Sep 2021 19:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192406; cv=none; d=google.com; s=arc-20160816; b=RAaaDI67xdgWpBi6RhodKsdfiVM+d/9857OwTeCiZxT/rBXjQKaSGX8gOFFd1eKJfg PLd57+zOuVSQR51VQ9Fr08wSbDyCJ1kjiKFoGKm8LmEiyVX42jV6xyVugBZTsJj6yWzP iQFp724g6CulPZ3V16HmQDWPYVGcbTll8qhFiV5LwLeS+WkT+ILKZUd0ZJPb8yr3eoq3 qbORDOPjpWPOzBvDxlBk2QnhD3UY0R6uIE9QxyAuACEtcyMzDvqm9IJhNmmswGSXQb4D FtK/uwYjwDkpsUy5bteb4P77w6Lb7TZrl0TLook6QKf6x73IOduAzCz/NOGsBk2XcEug u7bA== 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=WLnbnnUgZ3w0Wfwgy/7LKMf5SFVT0AmKu/E6KtBmYYE=; b=AyEFPl08cQ6bDbt8qttKJZ3RmjlFGJPGLQfWLQT9y95FldOwsYO609rO67mYnHroI4 roDAPw2j/10BxlW5e8UUK8B+0UEt3kfRibmMqcBLGtwC1/cgZa1zgMlIjqkMuEsrvz24 wwf5c3eLO/IrJdOiU5Xo50f6GDg9/QcA9qaQCA2NKvLBDd6/OXXMBn2QSuYMYrSmu+SF iPXK7RUsZBw9JeGwYz3G/wnVBCOkqyZkJ4V0vj/kqe8ygJWDFAk6f3PHQonRkanl2Pfq egnlLQ2/MEs0Pek16Qjy6EpMEej889HmODQAlaVaJkLl1+IzGsJjSXr4ONPW3V4ThPPt Gflw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U2GOppg6; 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 p23si20742653edw.135.2021.09.20.19.46.20; Mon, 20 Sep 2021 19:46:46 -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=U2GOppg6; 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 S1352475AbhITS1u (ORCPT + 99 others); Mon, 20 Sep 2021 14:27:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:40988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358736AbhITSU6 (ORCPT ); Mon, 20 Sep 2021 14:20:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EE73160EE2; Mon, 20 Sep 2021 17:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158630; bh=phAjSoCyI3ewBD64UJ15KDAR0prdvYouAlArjNQJPf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U2GOppg6S4MNF+Fy2ALcGhwIi+mC0KxXAaZj4IUy579aeg8hgQI+G9jTf5P0ccioK /3ZczYdibDy+UuRJ96jUVJ6QAkjXtYuliMlnhTvNxOy3rpue5Oe4LdXnNKdaP0D6PO rJSvLUcuPOZNt3a2ViMdkaG6mxFz6dCOUnB9lQiM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Yang Li , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 244/260] ethtool: Fix an error code in cxgb2.c Date: Mon, 20 Sep 2021 18:44:22 +0200 Message-Id: <20210920163939.414841431@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@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: Yang Li [ Upstream commit 7db8263a12155c7ae4ad97e850f1e499c73765fc ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 0ccdde366ae1..540d99f59226 100644 --- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c +++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c @@ -1153,6 +1153,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; } -- 2.30.2