Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352340pxb; Mon, 20 Sep 2021 19:49:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm8V0tvS5VH6PZDgC3rsnAhou9UM8kiBWKM59tz6vz41yUFSQBv0MLGc/jwpOqV+RBdtcR X-Received: by 2002:a5e:cb41:: with SMTP id h1mr5587345iok.146.1632192566038; Mon, 20 Sep 2021 19:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192566; cv=none; d=google.com; s=arc-20160816; b=zfiA4r10IsYosG1k2mDa4BWBWve1jGz4IWluUAtqIBxXxcQNgpLHL9TJ2wQkbE36ex eso5HAUVvAE8EamEBjw3uMAHJ6Qofn4J1Gb5ky4LBucq3iblg4WR4f1X7RhOq763QNOh VxXuCK7aGxxprVgOC2D2LvFLRgXXaEyho2uoUyX5WYlM2GHyRQ575ZcXk1pIPwaCp32L KILjSKMdKXmNB3dv8i6hHoWMVDxJxctEzaRzvG65vhytQdSxDMdLYG01ZJpR5S5TgYCq /t5PrGYze+bSzTm4TSfzlknQmKiB3gFO2qVmEqvFWtZCY0fnynQlDVHvQpH5aTZZ+hGJ OcUg== 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=ynmKAkAM4k74M0LRQkhMmMwRYkcHCkokiin4b/XaNZ8=; b=M3H7mDl1gzBOIYJVR4bqW/bWJzuSAy07lQY7BgtjYXqCnk5rRsEc4hqYJwyWB+OwDx O7N95ffVLXJqCW2NwUh6+J8PCRMEc1h+FpPmfzr2akUKpNHCnUM0SHxMWIyj5Y1R/ydU kHbL7dglwDGSBA9s6DzPvQ1wVEgz5TWLHFbtSaD2qlt7WQ4NLdJmd1gnskuu+/h7HC2s fHTMhKOcUIZlpbZ6SrjZ6Y3f5q7Bp4UUtblOgG4gNDi9piVKGkeqYGEOs47oj4ifl2I3 J+04KgPQkCqrvEQSYF9t6dySvx13c8MPuzJAWUT1yEWzUvWQOcOUtTmqPIUYI75WSM69 0ELw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SuaAtEG4; 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 c17si16975279jam.29.2021.09.20.19.49.14; Mon, 20 Sep 2021 19:49:26 -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=SuaAtEG4; 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 S1353372AbhITSgE (ORCPT + 99 others); Mon, 20 Sep 2021 14:36:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379748AbhITSaZ (ORCPT ); Mon, 20 Sep 2021 14:30:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1BFBB632EA; Mon, 20 Sep 2021 17:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158830; bh=M29a5ze1Ffe9rMjbkQ+l/WCuAVOqIQPDBjVLNaEX5OM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SuaAtEG4iwCLFhZDAHlmv6kWGiK9zlZCF+D4MgMIbiqWyMhgKuj+veLDtURa+XkO3 aBeB4LRZhcIdFusyVjsaGo70b0d8yf4ZDFgX19r2arQkpkJYgDWyrdab56JXKms8oD 1Ort5TtZl8KLU36HEcZaaocmgXsqJfZ71ywqKJLw= 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.10 076/122] ethtool: Fix an error code in cxgb2.c Date: Mon, 20 Sep 2021 18:44:08 +0200 Message-Id: <20210920163918.270285759@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163915.757887582@linuxfoundation.org> References: <20210920163915.757887582@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 0e4a0f413960..c6db85fe1629 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