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 A6FA2CCA468 for ; Wed, 1 Jun 2022 14:11:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354718AbiFAOLK (ORCPT ); Wed, 1 Jun 2022 10:11:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355012AbiFAOF1 (ORCPT ); Wed, 1 Jun 2022 10:05:27 -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 E9D01AE47A; Wed, 1 Jun 2022 06:59:26 -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 2796EB81A79; Wed, 1 Jun 2022 13:59:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A558EC36AE2; Wed, 1 Jun 2022 13:59:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654091963; bh=uue5EE1JeN8GGNUFiqBSIhubZNl+E5Jqm/EiHbqvVJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A8axB6gvgoAxuuORcvfnET23ascrUHYZlb3nBL1rR0p5l/VKQ49xuFqwFpmBwtf9z Hk2OyXSPg0DWlQy6gI+HZ+cu2lCrPKvwkbmpMq2o2aDBopSyL8BIQwnmphh22ffbK8 8IWSyT7QX9Sllt/F/GHl+wiv2NZ/yPLdKPk4UJkdXCeRiSezpKSigoUELgpCSMHtEU GdsMvCGDypaoqFxNR6cHgn8JeScvwVu6kpPm+vjxBxpLHoYuph/2blprtuDC7Ly/5L FbxA+tVMZq553t6j/DLUaTmAyU5SC1vbmmsrozWO+Ag6L4YkJmT/khfXn4my+Cae/M q4Fv4oMjq7byw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Peng Wu , Linus Walleij , Arnd Bergmann , Sasha Levin , liviu.dudau@arm.com, sudeep.holla@arm.com, lorenzo.pieralisi@arm.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 10/20] ARM: versatile: Add missing of_node_put in dcscb_init Date: Wed, 1 Jun 2022 09:58:52 -0400 Message-Id: <20220601135902.2004823-10-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: Peng Wu [ Upstream commit 23b44f9c649bbef10b45fa33080cd8b4166800ae ] The device_node pointer is returned by of_find_compatible_node with refcount incremented. We should use of_node_put() to avoid the refcount leak. Signed-off-by: Peng Wu Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20220428230356.69418-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/mach-vexpress/dcscb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c index 46a903c88c6a..f553cde614f9 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c @@ -143,6 +143,7 @@ static int __init dcscb_init(void) if (!node) return -ENODEV; dcscb_base = of_iomap(node, 0); + of_node_put(node); if (!dcscb_base) return -EADDRNOTAVAIL; cfg = readl_relaxed(dcscb_base + DCS_CFG_R); -- 2.35.1