Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2320056pxb; Mon, 20 Sep 2021 18:43:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw00TAh4gUb7qF05HPWIqgdZHp6i4K7RNBG9wrtgF/E5thkMCuYcLzbqWUG/WZSopQayCNu X-Received: by 2002:a05:6e02:164b:: with SMTP id v11mr9912171ilu.224.1632188616464; Mon, 20 Sep 2021 18:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188616; cv=none; d=google.com; s=arc-20160816; b=q5wvODNSqi3zLc6Mz4c5ZpVdBdKedCisZ8+MKhccAd1pr17xMWmvGeKTapmmLtuq++ l74ottuXMQwcRPJpnSquNXZePEdfGihK08ULcViJjuVFv/2CWBSZRWjlxps3/65K+rr1 k6J3U3c0bgYTYI1e33m/QqyczSHDCfEGVVtTorSKk1sn+wlxw+l20wh92aSo8XrjUh77 id7NqgnNqRFxkohRacOaftHt1gF0PXtKEvdJ0twOwjm93GKQ2E9nlI10d+FHVYJwoQt+ TKeLlPjW6J4+oZNoeqIQsDabqGZU2u8vZ7/bV0fjz5kk1zsWMXjoXL0cjcCgzjPIhl80 waIw== 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=FuJEK80+DSVeC1LkyR7APik4I+OZVCOzHMDJqoWFk9c=; b=p8/3yjaTP4GxorZDOXdzdkn067CDkHBMM1gd//lxIjwjmrR8P0YYv2FyAkGPHVeDSM z9bwtoJxQV+76SDpqoQVWxNbv442VE3ED4+cqV1RS8S1NHqmQ41AXzF8WubHEIOX7WU3 mHzciTr1ReSUsdJ/lC2qRtCp4BXrLpBtcVWotm6A0ZNFCFrRaOGubOlj8nbrgm4Grwbx YATRtiwUQ0Er/vDrDh81l36LaHUW6VhObE8ANi5Z2e09ix4GkJnFzmGUbxbcy2MwhbNu p5hiP9bhI3z1U1H2O/37DXGl61iT8wzvs27Y8eJ49OEYq80mZq6WRVgE15CTF6imTEm2 h/yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KiiVKMoU; 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 u5si2181957ilv.63.2021.09.20.18.43.25; Mon, 20 Sep 2021 18:43:36 -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=KiiVKMoU; 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 S245728AbhITQ43 (ORCPT + 99 others); Mon, 20 Sep 2021 12:56:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:37492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbhITQwn (ORCPT ); Mon, 20 Sep 2021 12:52:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F03C86136A; Mon, 20 Sep 2021 16:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156604; bh=Hk6/lm38Mo/E7s7d+TYfx7X+xQAAR/8dc+MEWNECQQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KiiVKMoUQ5F/ZFHQvTPHQ8z3MmWh78+KehNeC2RD70sOoCkjDojSF+XN3uu0J2lNx c3IQIlkjwnLUFrxYgSBJRF8P2wV6e4m77qM32iMYsgV2HUWf8IV/L7V7aJxlYDSBBb e0jlufMyp58V7dryjrhJ2XQT6EglrwkiSHZTh0P8= 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 4.4 128/133] ethtool: Fix an error code in cxgb2.c Date: Mon, 20 Sep 2021 18:43:26 +0200 Message-Id: <20210920163916.811673523@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 f5f1b0b51ebd..79eb2257a30e 100644 --- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c +++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c @@ -1133,6 +1133,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