Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3837909pxv; Mon, 28 Jun 2021 14:18:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqvj7ptnBN1IqRcdAuowrpVy937Vtt+lG4UetoQ/i16yN9YpvjBZRWnWgNnPp/vZ9ymMfi X-Received: by 2002:a5e:d911:: with SMTP id n17mr1184083iop.178.1624915096423; Mon, 28 Jun 2021 14:18:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624915096; cv=none; d=google.com; s=arc-20160816; b=bSR3eyReZ3LYJvbww2Gh23oEYxWFVOA0FVdHWPISb6dOeH3MaClFnTMN60Fn1caa66 vgfLoSMbbuk8+/Pd/3iP2lECgoqHp0rAuLknmZ7Z6Z0WB4SsPhzu8yF0pvk3yHhsoMg3 oWa8k7jEIJZghqvmW0oM/sy8t9Lv8JwKT9b+sZL2SdkqgYxDzBz460fhpy7eMCe6vsv0 6nqGcj+bS2CPEQJ4gqzv+iGoSreX6dcwNPUhb8yUHy9ZSZUZHF6VQbaTEa/KZ00IR266 yOykmwWvpAGxdfUyGm8rqNXILy78KzvT3ZC/CwLPtkOCBuKztl+rn4VzeVRi5P3puTLp ST/A== 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=CuXeFBH4il3MG6TEz6m9+cI1/CjOTaiM6E38Dm9P8aE=; b=n8jPzwEo28oo6Gr7an5lV6XiroCDZscJ1qISFm71UyS0H2vbpFNiClZgqrNUwbFSnh Nc13R3Yehk15PPSLZnqGPka4AfAfF1flye4Lu797UNMS/6KQW2aGv4D84DQzKO7ABL3t vQ/zw9FOBy8Wj/EKJ6ZIc5U39RbAU8F0IbBaPxO32zZFJ6NunJfIwUiQWTqoKpni6laP WIE8k7Kc+a5w5jjjqPJ14Y2BVFgVCQ/9BIk8vSsq9RfaAv09YbzA0/PUrlZdbAyxwdG9 CQ5TOXdRbKChkylAboXeXR6fQKJYToQzZfKS0f3bhzdGBOkMQgxfBdtdLmhdE+Ay22Sm 3/mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XV+b8fWP; 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 g5si17486787ilk.102.2021.06.28.14.18.03; Mon, 28 Jun 2021 14:18:16 -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=XV+b8fWP; 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 S238411AbhF1PVX (ORCPT + 99 others); Mon, 28 Jun 2021 11:21:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:36474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235258AbhF1O63 (ORCPT ); Mon, 28 Jun 2021 10:58:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 95D0F61C98; Mon, 28 Jun 2021 14:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891233; bh=7BcuhJM5XCOcma3ZPzVTwN+deEmpdKyNgHYmAG325p4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XV+b8fWPyGHmY+jf0WLBHdTEoph1dZObpdahvnKEPKuGP9fgw8U4iTpWiUYNLwzWF kmRJn9IO+Bff00vziFCSVXz/BmjCbKIAtLkYkkKKCHuuN7jXo1FYnJcasFPKlmREkx D6uu6b5uXcWfDy4WNplJAMfRILRHHLy0V9zm0B90dXNfX2FT1inGPWxJJXCpd6yPls W3drgVwcH0xsxft1hu9s/GCFD/4mO552/JH8jr9krIkxULE6+A69+UdXXZuuecpU0H dFhkT22FnvolATTJblsR25w5hioemIDt6RhghA7mXzlUxtFVUiuVXaNLM4AdedQwz+ 5kfid425YMgNA== 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.9 32/71] be2net: Fix an error handling path in 'be_probe()' Date: Mon, 28 Jun 2021 10:39:24 -0400 Message-Id: <20210628144003.34260-33-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144003.34260-1-sashal@kernel.org> References: <20210628144003.34260-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:39+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 289560b0f643..b0b9f77c3740 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -5998,6 +5998,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