Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3777359pxv; Mon, 28 Jun 2021 12:36:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAvgPcItj/L2vHYZnLfncedcXAKJfC1NVajtS6kXYGg4xSAfRxBOwGYqvSeOAyko0T4YHW X-Received: by 2002:a92:dc4b:: with SMTP id x11mr19611671ilq.152.1624908982966; Mon, 28 Jun 2021 12:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624908982; cv=none; d=google.com; s=arc-20160816; b=0pWd6j7L/IBlSyxFkcwvgsYRxgntjo2/gvfRJpLZG3g4vL2sxxeudUnLg+Nbj5TVv2 60D6qMq5wzJb/Gt6fYGTtOXDhsuKqEttYXy8CXBUe4TuTZMxyTzmd8VsUBVTA5LB1UXp WDDOyhKRIR12pVLJzyO2779hMY+wiymVjs9xMVH7a21GR44i4wpDxmd9zOTsynV8whLh DQ+v443V5eLXCgtzqWe5oA1P8byCMybUd+jYoFupknFIoeAczhg47p6s8piAc39aiASG jwx3Xq0Vh+k3Jb1pSz/90v2CCQzLB+wxAr3Cvrt6meFjWzau2jFyAo2R02IuhM8gQ2nE 08+g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i2q2+9XILDgBInCvI44ClxKuk6IgOAhwBdczwFbKhLs=; b=J7/MyhNdQwvAu+L5RupSHtpIysx0H/JFYNGFlGDC9qhY8+btocHaNYxdzCuMYlsZhc Imb44su7DRzAuAHIHUkXjyLXZm+pe39UPsjL/nI9g/r+ZKgk2uSuQhnaH8FJNxgx5/Lq CwaRm7I1PXc5cVplcjbLt6WLItpYVJHq0ngClX1OucbLjb+I0yCYX8iDFxfZq9gdhTEF 7j6Wq8rFaWsHusm3w1XpAWCu2uC6eBtyEBVO2fplz0d6NofF25VVG+6VER7mWa5eY/BR Bjk2v5XLmyubJ49FBn6++WkI/FUlMT2s1k1IvGzj+XdwkM9SdUN7lCVEF3sCunqroNvo frtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NWvBY2rl; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si18864662jar.13.2021.06.28.12.36.08; Mon, 28 Jun 2021 12:36:22 -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=@kernel.org header.s=k20201202 header.b=NWvBY2rl; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236835AbhF1O4K (ORCPT + 99 others); Mon, 28 Jun 2021 10:56:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:51836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234827AbhF1OmN (ORCPT ); Mon, 28 Jun 2021 10:42:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E949B61CE8; Mon, 28 Jun 2021 14:33:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624890823; bh=THz0LVY2wJia1LqifYXa/uGhV7AAA/g2jwRYhJV/w34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NWvBY2rlzaMltmfgBiP3kL9lCbeKj7qIOdTiZL5DM/mMGXEiQkXsvX4xjWkpijnHB ne7hxOJCHUduj3ERQp1+WHvEuVwDmdLrUFdOnW5/CqejgNOpvDNuUJdbwnSn2hUq/V kfSP/v5PQU4Sqce5CnOxh8G2WRUnu76NrrZNkdSOQu858nIR/o/D7KNqXlqM5SJYnG g3Ta8XRsNmAd6dwGmnbatvxh6dBnzRsbrf0xJA3z5xd/ukF6nKvOraYQT7u33Y3eQR ltS9Wp/1FHH0NHz6PGZ1m63cDqEgtfqMDCOgnK+Uah66pmABqsW98pr+h9itqgJDZB mJltg6Qjgd6ig== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , "David S . Miller" , Sasha Levin Subject: [PATCH 4.19 040/109] netxen_nic: Fix an error handling path in 'netxen_nic_probe()' Date: Mon, 28 Jun 2021 10:31:56 -0400 Message-Id: <20210628143305.32978-41-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143305.32978-1-sashal@kernel.org> References: <20210628143305.32978-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.196-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.19.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.19.196-rc1 X-KernelTest-Deadline: 2021-06-30T14:32+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 49a10c7b176295f8fafb338911cf028e97f65f4d ] If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: e87ad5539343 ("netxen: support pci error handlers") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index 42b99b182616..a331ad406e7a 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c @@ -1618,6 +1618,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) free_netdev(netdev); err_out_free_res: + if (NX_IS_REVISION_P3(pdev->revision)) + pci_disable_pcie_error_reporting(pdev); pci_release_regions(pdev); err_out_disable_pdev: -- 2.30.2