Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9170853pxu; Mon, 28 Dec 2020 08:19:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAIztnSIwLFrn2mu0XI1oLDkLlJPfSVKcfyIjMMzTH5q4f2igjC8KKftSrPuZKmruV0dpn X-Received: by 2002:a17:906:3513:: with SMTP id r19mr41481655eja.445.1609172396497; Mon, 28 Dec 2020 08:19:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172396; cv=none; d=google.com; s=arc-20160816; b=rFMnDfy/sNnLEwmr4/KksHo4v7ULINKtxc6skZgla7dOLf1AKpcVUJOeN8roOI8tfp LeqHprWeUgODfmLfW3XS/p1btgUouJNXGLkzdEx1p+Fr0KBiftIWq8oIOTy21UwcYQaq WX+bXa6MkIq5kSyNThwkwLZ9w0azQlItHl/ZxNrpCg7dHtQIPIFrPy7D4QekCTOQiEdA Pv5BURvLi9skjpX2WaeTml21kv5fVxHms+AqTHdOT9/6qReqa+AuDfCzZdpgToMPPe9I Iqi7f69Md20FiMh+iWoVn73LAIlFmMKylIMa5oIak+RNhYFinCl4AxPu05nNNvtgVqum MlSw== 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=7YzOTYNfgMMDDKz6rNu0OY637e97TNMYSx5h++0Eu/c=; b=vo1gj7UhK78LdqCs9f4CONDx7u9CicNhUofzZPHCTkoGsvby3pBc3k9HmqOmyHO2LT x82JLxU5ZN9EsD9vBgTQGOkbxOsxoPh3/0AenO4VuHXYeyZiJDYtEIryvFDk4ehQu7wF ReD/WyxhEsx1+Anb/YVydAclnXyyBKzYBYXDgx+duUPEH5DzhFrUz1c55bODMIRm4R0m DMBp3sgNyaBRxYSxDCoV79cYRmFyi2hT8w9b77DeHqpZDSI+2ArP8JZ44ByPpYoiFS1k zV3GkfbJrgQ00hO5LWaHrgyY9J9ebm2iv6c3tfM8HH94RRDlDFOAEv7T6NABUlL87EPo a0iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KgpedvJ+; 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 x27si18851550ejb.485.2020.12.28.08.19.33; Mon, 28 Dec 2020 08:19:56 -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=KgpedvJ+; 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 S2394132AbgL1QQ4 (ORCPT + 99 others); Mon, 28 Dec 2020 11:16:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:45860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731568AbgL1NR2 (ORCPT ); Mon, 28 Dec 2020 08:17:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 581BB22582; Mon, 28 Dec 2020 13:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161408; bh=Tt9ah73l8oHBJKPy+KBT56ay72n6oWKYEGai7OLO93g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KgpedvJ+XhNcXyj60ZtfW/uPOfmM94e0jqc2EVlzyCBNtQ4FrZkVnI9MbVprZFDBj Ob33p8poXbJ4Q1oONHu6yLUNCyTKg2VQJOMjHTYbAwujb4U2q5S4e6jKT7au7U4U7f fv1qT+fA/WBesJ/TSkhWONKEVX5bODR9j6yqM+kM= 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 4.14 174/242] qlcnic: Fix error code in probe Date: Mon, 28 Dec 2020 13:49:39 +0100 Message-Id: <20201228124913.267495759@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 1b5f7d57b6f8f..6684a4cb8b88b 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2511,6 +2511,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