From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D7CB34252D; Sat, 12 Sep 2026 07:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789198648; cv=none; b=NW4q89lEqO+AvrCItt6hFtSCs3VwyT6IOjW1F78AKMGltomht2i/uY/KNiglhITKT3+GYRQCYKOFgNWPSYqL50F7pBEM2aGtMnDNNN1BQzXCs9FHdectFDFOMZ7L1yKirGdrADkeJhTfB4R+ZuWl6LSNNy/LouQGoNUn6R4GCTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789198648; c=relaxed/simple; bh=fZHKb9Bs0VJTPkkEpvcOx6uMntUXq7Vc0o8nC3xeNuw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SX9eZLCanrGxZge/tPs5S21wKMGb8xcf6U5muPvRowFrfDYkI3v2m7KFXSTIAqKJBVvLrHXqO9TPGZsuc0kvz1ZVAz0lMacuiGk2+1KX0Wyv1WZbJd4pz9pQh67YXDCQ+jU4J5Fgqu7Pr2MB0RjvHbkRdazNhPk3b/j2MbHsiKg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f2PtVb1z; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="f2PtVb1z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 552B71F000FF; Sat, 12 Sep 2026 07:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789198647; bh=Ur1q22f5CNS7lRxLnZYx8rJcKtT8V6n+ZppfnAlzPsk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=f2PtVb1z7cz4bdsDDEMhPTpnstYqWor3NT4Ea6ndt5op5dZf28KrkZ89GTzcPd9/G 99GOwnZzNEflpPMpFOlkGQogQELs8ADHa8fRc0xB6zMPyxeBgL608DXgaUxixkv4SD m8YZcKU5ySgSAxaKFTglyBeGr8JfWUp1xSclCSqM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuho Choi , Manivannan Sadhasivam , Sasha Levin Subject: [PATCH 7.2 0425/1815] PCI: xgene: Drop unnecessary OF node reference Date: Sat, 12 Sep 2026 08:36:15 +0200 Message-ID: <20260912065658.873323717@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuho Choi [ Upstream commit 4869db344e76c9adfb1d9654df442db5371fac71 ] xgene_pcie_probe() stores dev->of_node in port->node with of_node_get(), but the cached node is only used during probe by xgene_pcie_parse_map_dma_ranges(). The driver never releases the extra reference, so the node reference is leaked. There is no need for private OF node ownership here. Use the device's existing of_node directly in xgene_pcie_parse_map_dma_ranges() and remove the cached port->node pointer. Fixes: 5f6b6ccdbe1c ("PCI: xgene: Add APM X-Gene PCIe driver") Signed-off-by: Yuho Choi Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260630195234.1871951-1-dbgh9129@gmail.com Signed-off-by: Sasha Levin --- drivers/pci/controller/pci-xgene.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c index b95afa35201d0..83c9a2930eeca 100644 --- a/drivers/pci/controller/pci-xgene.c +++ b/drivers/pci/controller/pci-xgene.c @@ -58,7 +58,6 @@ #define XGENE_PCIE_IP_VER_2 2 struct xgene_pcie { - struct device_node *node; struct device *dev; struct clk *clk; void __iomem *csr_base; @@ -526,7 +525,7 @@ static void xgene_pcie_setup_ib_reg(struct xgene_pcie *port, static int xgene_pcie_parse_map_dma_ranges(struct xgene_pcie *port) { - struct device_node *np = port->node; + struct device_node *np = port->dev->of_node; struct of_pci_range range; struct of_pci_range_parser parser; struct device *dev = port->dev; @@ -612,7 +611,6 @@ static bool xgene_check_pcie_msi_ready(void) static int xgene_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *dn = dev->of_node; struct xgene_pcie *port; struct pci_host_bridge *bridge; int ret; @@ -627,7 +625,6 @@ static int xgene_pcie_probe(struct platform_device *pdev) port = pci_host_bridge_priv(bridge); - port->node = of_node_get(dn); port->dev = dev; port->version = XGENE_PCIE_IP_VER_1; -- 2.53.0