From nobody Mon Dec 15 18:18:09 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E823C38A2D for ; Mon, 24 Oct 2022 12:12:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232871AbiJXMMU (ORCPT ); Mon, 24 Oct 2022 08:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232851AbiJXMLV (ORCPT ); Mon, 24 Oct 2022 08:11:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9A6A804A4; Mon, 24 Oct 2022 04:53:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 27602B81199; Mon, 24 Oct 2022 11:52:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8713DC433C1; Mon, 24 Oct 2022 11:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612323; bh=cVhhmhyue59m5yNPy7N779FKJdt+vjkUP23f1DN/X/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KqA7zQO/XDhvid3CIEb8HqpV4zh++aoOhRXJhkQlZS6BtJpexIjOSDMTPrBNxxUIq RS+aoLfn+10+Dl+vNeXY6f54C/ABuZeqQOIa7vewEs/IyGv00CAQpWPfz/ruVnVW4O W0DsYlrNHUSIx45lkUu/OBQZRZOKVLvJnsIXbumM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liang He , Michael Ellerman , Tyrel Datwyler , Sasha Levin , Miaoqian Lin Subject: [PATCH 4.14 154/210] powerpc/pci_dn: Add missing of_node_put() Date: Mon, 24 Oct 2022 13:31:11 +0200 Message-Id: <20221024113001.980834175@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Liang He [ Upstream commit 110a1fcb6c4d55144d8179983a475f17a1d6f832 ] In pci_add_device_node_info(), use of_node_put() to drop the reference to 'parent' returned by of_get_parent() to keep refcount balance. Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn") Co-authored-by: Miaoqian Lin Signed-off-by: Liang He Signed-off-by: Michael Ellerman Reviewed-by: Tyrel Datwyler Link: https://lore.kernel.org/r/20220701131750.240170-1-windhl@126.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/pci_dn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index 0e45a446a8c7..45aa39d55f91 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c @@ -344,6 +344,7 @@ struct pci_dn *pci_add_device_node_info(struct pci_cont= roller *hose, INIT_LIST_HEAD(&pdn->list); parent =3D of_get_parent(dn); pdn->parent =3D parent ? PCI_DN(parent) : NULL; + of_node_put(parent); if (pdn->parent) list_add_tail(&pdn->list, &pdn->parent->child_list); =20 --=20 2.35.1