From mboxrd@z Thu Jan 1 00:00:00 1970 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 3DE6DC433EF for ; Wed, 1 Jun 2022 14:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355012AbiFAOLW (ORCPT ); Wed, 1 Jun 2022 10:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355171AbiFAOFm (ORCPT ); Wed, 1 Jun 2022 10:05:42 -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 09337AE44E; Wed, 1 Jun 2022 06:59:34 -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 BFBB6615B9; Wed, 1 Jun 2022 13:59:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B0CEC36AE2; Wed, 1 Jun 2022 13:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654091974; bh=tiyZ3eOGweBf18A/dadGgQ0sLxVwdPM+W/Agj24C7+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dt9pw/DzDFEQ76hRdI/jbTDaE7sWEc35vtmcYkIylHlRARjdJ8m8QeEn1m7JszvHq 05VHeHWybqF3sqFqJ0f1M9kZawIwSY12g29PSmzDqEtgr3PMwW+ImihwrJB4OEyqpk tTF76807R9MIPMmHH/MuM0h4f/8MLb1IwIeYm1iRL/a2MpBIDm2R0v+zxBXf495byI h0n21rE0aa6iqJylbWBm6NkTtmzinHApPf6ZyUfm/Bh9fKlG0NB5WR0s9eNswOg6Qz EnTXEWzYKhRz8xavgJs/sC4wykj2nitc9EmEiVDD3qX7vOugJxF3b3hgWrAxz42rMA mOcpWaKVvgtaw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lv Ruyi , Zeal Robot , Michael Ellerman , Sasha Levin , nick.child@ibm.com, maz@kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.4 15/20] powerpc/xics: fix refcount leak in icp_opal_init() Date: Wed, 1 Jun 2022 09:58:57 -0400 Message-Id: <20220601135902.2004823-15-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220601135902.2004823-1-sashal@kernel.org> References: <20220601135902.2004823-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lv Ruyi [ Upstream commit 5dd9e27ea4a39f7edd4bf81e9e70208e7ac0b7c9 ] The of_find_compatible_node() function returns a node pointer with refcount incremented, use of_node_put() on it when done. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220402013419.2410298-1-lv.ruyi@zte.com.cn Signed-off-by: Sasha Levin --- arch/powerpc/sysdev/xics/icp-opal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/sysdev/xics/icp-opal.c b/arch/powerpc/sysdev/xics/icp-opal.c index 68fd2540b093..7fa520efcefa 100644 --- a/arch/powerpc/sysdev/xics/icp-opal.c +++ b/arch/powerpc/sysdev/xics/icp-opal.c @@ -195,6 +195,7 @@ int icp_opal_init(void) printk("XICS: Using OPAL ICP fallbacks\n"); + of_node_put(np); return 0; } -- 2.35.1