Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9092083pxu; Mon, 28 Dec 2020 06:26:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk+d2Ayf+8dODV1TPDlf5OMDlNUXys/ws7actNMxLOgOD8To3XEMIYstZNrk4JGS9n0iIW X-Received: by 2002:a17:906:f0c9:: with SMTP id dk9mr42203832ejb.51.1609165605819; Mon, 28 Dec 2020 06:26:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165605; cv=none; d=google.com; s=arc-20160816; b=N3N2uss8BV4LiNUQHnJvwxF/0/ekeGYtBIOFNfjL3cck37sJtXiw1U6ewuC49atr4A CY/Or/afonb3xgFhO4OeK+6tDTKcKqNBQ1SS6m4vu/tn0cllQjeA8uRpBB3KHLlqhDt6 fHdGfQfDDbgeK/r6EmcL4yAcL5A+fFbZ2BMs1JyRpzLu04en7hiJpkxJf1bFjSTmxhdC 3QxzseY9IORR8pZ80cwhTLBH5NAYOAbCsy0B8utS6824pqlPfE9qVWuOK9pqJJuF2cIh CnwMO8la3X24f+XVOVhatiTxlvY5dlv7wK4Z8zuY9dz4Kd+ysmh4JdSdjBOYJFQEHPaX zOCQ== 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=t7digKuHYxPARQNitOzYcxIfPIlXSHhrnAllROp57gY=; b=xGxDNPrB/IFm6POO/Er2YMzkQzX1RwIdjRquztrkBrrvEpxbi1c+ASt4ntlSkkso6s 5USqimLuEC3ETjuVm97hw5aW0Nx3X8VIlB54Rr/+pcBbzEBY8f84fSAbl4NvSDDpHJfQ nIugEBfiALnlSNjrKOUaqAOX+YgJ61iXdABrXatJAkBOl49rbS5aNmJ1Ea2/64LqyOdn Bp1Gb8p6MuSzdZcNKRP996Kx7Jr09uAzDTdKiqAra2Gcnwh7F8zLQf1zbUV7BO67JJYw XD2X/i9hgsuNtvzv+xV0gtOH7b06iD++MwlfZI+Gnl29N5qmSYrvZ5B+AMuzGpcaxm43 nIMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jQ9P5CAM; 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 m7si18234377eji.498.2020.12.28.06.26.22; Mon, 28 Dec 2020 06:26:45 -0800 (PST) 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=jQ9P5CAM; 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 S2502002AbgL1OW2 (ORCPT + 99 others); Mon, 28 Dec 2020 09:22:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:58090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502653AbgL1OWZ (ORCPT ); Mon, 28 Dec 2020 09:22:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 04A93229C5; Mon, 28 Dec 2020 14:21:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165305; bh=LO7Z7cpT3HSB5ywvOQW2n2mXrUz8dPcxydiH2FxqTV4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jQ9P5CAMXlG9tq4z/zNO798yizkpx5sTJCsTOC3FGWTP/SWvueKQESHCDXHLnoZIn UkdJ9d1YLuClC4eFDE0hMVAmWAAgjpX8u1Vm8OYPbnxdqOGx2puSsSily+zTapD7+n WmUQfyIpcAfGaGmlT8u0C5z89rrCpeZq+DNRUDpg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 486/717] qlcnic: Fix error code in probe Date: Mon, 28 Dec 2020 13:48:04 +0100 Message-Id: <20201228125044.247058646@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Dan Carpenter [ Upstream commit 0d52848632a357948028eab67ff9b7cc0c12a0fb ] Return -EINVAL if we can't find the correct device. Currently it returns success. Fixes: 13159183ec7a ("qlcnic: 83xx base driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X9nHbMqEyI/xPfGd@mwanda Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 5a7e240fd4698..c2faf96fcade8 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2492,6 +2492,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) qlcnic_sriov_vf_register_map(ahw); break; default: + err = -EINVAL; goto err_out_free_hw_res; } -- 2.27.0