Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3919263pxj; Mon, 21 Jun 2021 09:22:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSglT4/loWnrto2gctdld4R4ytssFpKX8IbTRI4mE24csGL3zXd33nMAB7TZ/8d9jqEyAr X-Received: by 2002:a17:906:270f:: with SMTP id z15mr8626500ejc.340.1624292532209; Mon, 21 Jun 2021 09:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292532; cv=none; d=google.com; s=arc-20160816; b=KKHJEx2OIim6I03rr0Xp8Ef86dWdFzl0JO04YVvgKDBECw52Yl6iYresqieMdu0nbP 0gzrr0px6tmUTRwyBMPiBV+qewMnYHgtE9AidnuZj6DzDOKMmYZj2CN5H3xXbj/V/RGS Uah5Ozs3w0VWJPGcgYKQEPi19RwkMJADqoKZEkroRUmEjb20g/UWjkmT4+PL7ei9dTMX HPxgJklKVKiBV3e6nXTBgrTTPAPT6/mWEK8OpjSU/k+vFZMhsxM+znNlMiQcrqd4n+rP QuQgU+Jj25jPHZRfF2D/uV4NHMbicsRQE18wwbnZ9xNdA0I7iZuJuf/K9fc0oMHk0UBc Rn5A== 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=9Y/G78kLjNqBprFVo/7HhfN4d0GOC304RVTI1ZLY1gA=; b=JL9jFjilo+VcRW6xOJWLN4UP0KLre/zO9s980ctwo0Iko/LFNOBmCsIosh82CUXoL7 0QOVb+jifQ6IxNH1KC74ce21z2NYLsdwP5xaYOO3sBAX8IbhL3YntYC1B69BuTHxPFxu HG7f9n0tsM8+jLP+kz6vYwTN0rxKpkA2iTfjv1I728Ew3tDMI1Mr/YOw2OQGV9djaenc LA5jOo5wxRZR93rdeMNGqM7phy/Mh2FrAkz4ZC8c5DH/hkm0yt0JphlMu8Xwz876OfMr JOXPtvptxqvOD7J7kuaF+rXNsk/phfOJX5dVuxlyUC0poxzwF4VuWpKoCr/lJ9F71u+u O6Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=THf4Whxz; 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 f22si11364685ejj.660.2021.06.21.09.21.49; Mon, 21 Jun 2021 09:22:12 -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=THf4Whxz; 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 S231517AbhFUQU0 (ORCPT + 99 others); Mon, 21 Jun 2021 12:20:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:39848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231357AbhFUQUA (ORCPT ); Mon, 21 Jun 2021 12:20:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CAD5B61206; Mon, 21 Jun 2021 16:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292265; bh=pmEHXmeHLRuARTxAe3cAJWpj9+zGJ4hdCv3cu+vSC2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=THf4WhxzneLzDAYj3AeVo5kegFPaeXIFYWWA3XXbmsoD+ZNq1i6kK8Dgu78uyt2Pq y9aVos/0KyZZjOMLCNY8YAmtsB0cMMYVMBKn+leLXFK2vXNMqCceQ+bfejWF2xqCzP jV9pVCgG5dv1SQCcwvWcujoD22D45NC5c3gLNBOE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 26/90] netxen_nic: Fix an error handling path in netxen_nic_probe() Date: Mon, 21 Jun 2021 18:15:01 +0200 Message-Id: <20210621154905.008089860@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@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: 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 25b6f2ee2beb..1b9867ea4333 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c @@ -1602,6 +1602,8 @@ err_out_free_netdev: 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