Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3594268pxv; Mon, 28 Jun 2021 08:10:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8ZlOSsio2KH3iwfM7KwwTXVxnhCfdPOAPwe0PqvOauoNztrgwT8B772PPsaVP8+PdOtMu X-Received: by 2002:aa7:cdc8:: with SMTP id h8mr32895203edw.323.1624893057957; Mon, 28 Jun 2021 08:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624893057; cv=none; d=google.com; s=arc-20160816; b=axjsYVOgKYJC0l0gjsrjGS6Ub8fGpMc/jv3Vxn3GTNwF5hWls9ELzmFpXRDhFd+aWF ptrHq/qfZO765LQCGMnxdViQ1MPLV3mfJ8cuBtQzxWbZYq14CTNbQog1s+CMmIMmkgCw XDO96rE+NhUCHyDCP09MqScx23Cv8wH+j1gZlpn0phxVyskQgYQinyL3GrJyPcfjWvI4 mdTvixEouSct5H9dRkecbJWr/BkQLxJ7hoXmCu93Fg8clG6PqcVZKAvFFU2aLvxcRcdf JUGxCMrSKWHbCs/guMVK0F2sgMfQERkkCkbz4zczbbxa4IZwb6+HwhpxCcxrpQFY0m5J /v4Q== 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=nM672KHyJmRVJecUTD2zW6MC8ANVEg1ANbBIZMHpVH4=; b=Mgs9jDP8ddrbDBbeCQIWmVVm6x4d34JWGgWvE9BxP7UO/bJFA+7VqGX+SFwtM7/8dS DqwtU0orRDVF17uEbGw5ODFUz0/tEeme9bNHz5e9UU7gvu+tltlks3mNDqVslzHDibqI BUZ+fcdq1O87zkE/lnP7c3wXahJOaQ0hkKCcuXJ83OAAlyeX5kK1TIhp4/uNyMiERaN6 sxH6bvt54OcnrJWzQiPmGR1eMiBm8QW1Az+a/dg0kGrwguLb2TOX7AQW888b02tjS40Y Ocunhh9N7Zp1PmQglajyps0hOrJhTbSsLuujKio+Ksa1Z7XTwAfZpZQIYnxLHZShDnLC tvwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BspyajOr; 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 kg15si6295456ejc.718.2021.06.28.08.10.29; Mon, 28 Jun 2021 08:10:57 -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=BspyajOr; 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 S233103AbhF1PKp (ORCPT + 99 others); Mon, 28 Jun 2021 11:10:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:55958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235463AbhF1Ous (ORCPT ); Mon, 28 Jun 2021 10:50:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8C27F61D29; Mon, 28 Jun 2021 14:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891022; bh=qFoW+Lily5SAupUVjLvebr411IbgZAEne0xEraeU3G8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BspyajOrj3teJ73rJSSk1QtO9gfOwmmln5cx1UYAhY0hCIrfisUQYKVAo0Ql7ZITr 2N/KzT8vxd0YGQnGRftJyCeN58WXo2vagHD1Wfm4ZQbdsksiNNYdVJcbdZ6CS+IM+p GhH5ify+HAwqbMzoHB/rCTP7jeuHCzMb4s+6i+Wcij9g+K2NdvOFkeJbhc4+OYbAta +5oNJtAL8YNHNA6dkpK1427+A7i2dal4LgohbpNMJ4mRSpHHUJf5PnkwcVI0SkIvCR 93G4pm4AJea3l/VFXtvEUgCATlmRjmkQwBpi/K9fwGFHBtilJ4haU82k7xDx802/1Z UXfHleBX4ItXQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , Somnath Kotur , "David S . Miller" , Sasha Levin Subject: [PATCH 4.14 36/88] be2net: Fix an error handling path in 'be_probe()' Date: Mon, 28 Jun 2021 10:35:36 -0400 Message-Id: <20210628143628.33342-37-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+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 c19c8c0e666f9259e2fc4d2fa4b9ff8e3b40ee5d ] 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: d6b6d9877878 ("be2net: use PCIe AER capability") Signed-off-by: Christophe JAILLET Acked-by: Somnath Kotur Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/emulex/benet/be_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index cabeb1790db7..43ae124cabff 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -5926,6 +5926,7 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id) unmap_bars: be_unmap_pci_bars(adapter); free_netdev: + pci_disable_pcie_error_reporting(pdev); free_netdev(netdev); rel_reg: pci_release_regions(pdev); -- 2.30.2