Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1061023rwi; Wed, 19 Oct 2022 06:20:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6flhe+wcDy5CHC7djK6BsSjvWvEyQ5hOIQf4r4wNyHNOO/S8mG6r6Ejb5u56uLC/M3WA7S X-Received: by 2002:a05:6402:b5a:b0:458:f4c6:8039 with SMTP id bx26-20020a0564020b5a00b00458f4c68039mr7472589edb.349.1666185618593; Wed, 19 Oct 2022 06:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666185618; cv=none; d=google.com; s=arc-20160816; b=E8fCsWjtsRrF41rqMpQd6vRcEPc7E/zupx6etaheHUSyDSJaOhRep1WFsSjEQR0r7L ft9Xj1tGxdlPh+yyDo6YUyu5ci6FMLfQLT5P9wtqkiET1pAQVlzwQaPrlIKWh6lcgWke ftz+LhME/SM2Zt+svUixvoIM1N2574WqVwSL9RHoM4B1H+bl7ONX6QSnCxmRKrXQnwwB I+NL4i/dfol5SHApfhUR6u11N8oMfmBjnYGga5ek7TLuQJoNaAu3r7gMPPgQosEmj8xa Xuz7PWF7MzpUvmisFobfnQdwsz/lMSDhXgj+CtgpYpo+Nfwo7Ksq2xVq9k37wOLBZ62k wQDw== 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=wovkUgnPvx6sGLMQsrZdbl1gcKjaz76O5JZJuZhYsfk=; b=ObILVo8jg59UpqtKkzAbDD1U/DHMuIDFpfaY9h7me+ywQHwTZ+ky5KfjujcL4qFNdq 0779l+I893rj+IPNVGpyu6E+iZX9BEwzdu88H6hidETXUdbrkN7hGSn9fklvYSIpy1WI q8nZh1Rtjus1We3JNkSbFXK2fDI4dVHp+WrOBdzPEpx+SYxvu58ihHh1kC2sw2w5PKHM jFVDX/rakWKczQztOKZ8epVd0GrOrWIF5As4zzkOOWnhsoC+gTMo/tM2UKi5wn8On2RT YLS5LCFY6mv990A/YsCIm8dsZxMa3NTpYOgQW9uSlpBTVDWsNpjvN4flPDhjICCKmxXH fQQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0TxidLNK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a056402191100b0045cfb63a018si15946530edz.31.2022.10.19.06.19.50; Wed, 19 Oct 2022 06:20:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0TxidLNK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232697AbiJSMTQ (ORCPT + 99 others); Wed, 19 Oct 2022 08:19:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232965AbiJSMSS (ORCPT ); Wed, 19 Oct 2022 08:18:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08F4BD994B; Wed, 19 Oct 2022 04:54:04 -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 dfw.source.kernel.org (Postfix) with ESMTPS id CADA661830; Wed, 19 Oct 2022 09:05:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7A82C433D6; Wed, 19 Oct 2022 09:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170317; bh=SI7plIqdRlLsHgnZt/jOcTT/x5bXkEhsGCXsGVX6uJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0TxidLNKRUkBWIP+gUPsM/A+d8lk6OAP38BU/8ZhuFoSg6KRajRZo4mJVKnr4BdFP Ce5o7yOUpJa+of4nBX3YtncECBibcLMAiHnOKE2nA6FdGfaCwtdQDsZl9kbyoqiXdP M1JuyBzOJFocWVjjsGSdBHnz2UVF+f3IKmmkpfHE= 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 6.0 610/862] powerpc/pci_dn: Add missing of_node_put() Date: Wed, 19 Oct 2022 10:31:37 +0200 Message-Id: <20221019083316.883193225@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 7a35fc25a304..38561d6a2079 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c @@ -330,6 +330,7 @@ struct pci_dn *pci_add_device_node_info(struct pci_controller *hose, INIT_LIST_HEAD(&pdn->list); parent = of_get_parent(dn); pdn->parent = parent ? PCI_DN(parent) : NULL; + of_node_put(parent); if (pdn->parent) list_add_tail(&pdn->list, &pdn->parent->child_list); -- 2.35.1