Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9180250pxu; Mon, 28 Dec 2020 08:34:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTWVyQEFTBBctGZiYfYMLZgWwaR+FJ4cfhfDcbBrMK2a1PB/d4ksVf3ujfvMgJSPpy5Cu2 X-Received: by 2002:a17:907:2506:: with SMTP id y6mr42297685ejl.53.1609173262728; Mon, 28 Dec 2020 08:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173262; cv=none; d=google.com; s=arc-20160816; b=iYg+shO+DhTH1K787eSBv1MnfwYjwQZBm7KTf4bADhrneDYQ7Dt5NpuD7gTRLUT9LX aUqZqzB11Fv1/fpZoZpJLkg+PwLbTFGDSrB8Z0NNWHmzZsBht9BCnH2Bl1kDVeEoKvCA WPDNqHzJdZbtljiX6+uHPhoyPdiT89aONSp5SEQHvITDQh39okkdfYhQY/a6oMgqZRSI IidCJeJ17ZAogOsDq5I/TfjJxQC5h+PPo9tjlF0Vifn/w0xx1mS55wi1cAKZzi6NFe2u VpStYC1FJfsMuSmwYYMqLYiRojqNg8NhwaGpS6uoguD+eymqJxRSKvyZgtha/EsLEGj4 2Vww== 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=RzzWRUhC+bJoDME62kRjxtBngac7APERtN4iUeSCXG8=; b=rO+Rq+sKRqcbj5zxI6M3EaDtus0CfWl77xkAdrcqpjVYQTWUshFO9X7VFV2314yvEE f+bcH12QAv40L5fVX1VDbQ9zcQJwCTvJIll0t+zkr4x7hbIUPrujKnh63L6syGRTvO2Z ZE/cMJCkCzWwBDd90lErq4DnzuMr1INLmci1sJiJrXO0mgMa77fMntkv9Di7mohwVY41 hhiqBddwnqcNZT4L95Ptj0lbKLOeE1XEC3Hwx5eGhd0Uig0RQf0NZaUvwb5R/Bj1YQ/e YyHTEGWAlK2SU2GjMCEQkVdREdir9MCQ+I/7F27E+RTV3Fs+ebfoa3KGyLdRWsJ6+/KC 2J1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="UL/1aMYj"; 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 d20si18062177eds.14.2020.12.28.08.33.59; Mon, 28 Dec 2020 08:34:22 -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="UL/1aMYj"; 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 S1730211AbgL1Qas (ORCPT + 99 others); Mon, 28 Dec 2020 11:30:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:34198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728712AbgL1NG0 (ORCPT ); Mon, 28 Dec 2020 08:06:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E2F4A208D5; Mon, 28 Dec 2020 13:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160745; bh=SmTaqo7WzE/EmaufsDZ7mCiHw4+6ilbbmMuXd2r1WVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UL/1aMYjPtcBv6eWEWMudJPxtsbOHOpzRs5aUC9xhSt2Ux0nExGijKX0Sul94EkHB i42MFHrIxSxqNccPaLnQVdhIs0PYRQmMrveDJICsFxkyVDejcGQqmE6coG4J50sZ8t 9pS/HpGFFSXhrZgiRXj6g0VTPVuxE8hl0mc4CJ58= 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.9 126/175] qlcnic: Fix error code in probe Date: Mon, 28 Dec 2020 13:49:39 +0100 Message-Id: <20201228124859.359088678@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 ebf5ead16939a..0928da21efd04 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2507,6 +2507,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