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 2962FCCA468 for ; Wed, 1 Jun 2022 14:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354970AbiFAOLp (ORCPT ); Wed, 1 Jun 2022 10:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354526AbiFAOJq (ORCPT ); Wed, 1 Jun 2022 10:09:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A135E0FA; Wed, 1 Jun 2022 07:01:13 -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 ACF4AB81AE7; Wed, 1 Jun 2022 14:01:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B8DBC385A5; Wed, 1 Jun 2022 14:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654092071; bh=qToVZsXl134a53xo2VcsV0MaOUoIecEvvSYgrba1pOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hbchicdfftPpeVVO6pNy5RwfQWz/2cI1qrNhhr0go17Zvv8jicG9tbpVPGJ43da7L ipgJDHULdo1KoDJFjFjn8uUiIO2NsNUSs0RoZbBj1RwjBCUuNATpABufJJeLn5yJa2 1jrdaHASVm/d4zjAOpkasFiOh9DXH/K1c3U1n0rBh1J4zyGPZb/qXseHCQZVosypll bD8VJdgqNUqJGocg87nygAq/2nqOY+qZMrcMWt3fZd7KkzNz6+TeyFix3TZusA5h9w gOqWhSgsqunJzKn/VBwDYSVNnxI0St7lU1wr+OvzBSMmPoFhoV9bymL2t5vGFcIT9r 0lg12qYnFjWnw== 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 4.9 05/11] ARM: versatile: Add missing of_node_put in dcscb_init Date: Wed, 1 Jun 2022 10:00:54 -0400 Message-Id: <20220601140100.2005469-5-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220601140100.2005469-1-sashal@kernel.org> References: <20220601140100.2005469-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: stable@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 5cedcf572104..3e86cff1d4d3 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c @@ -146,6 +146,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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FFDCC433EF for ; Wed, 1 Jun 2022 14:28:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l8R+ff7JxTvVR4E5w09gN4do8leYimKONOBGE17RjME=; b=1NziGKFBzVcvbw +NSfhZXBx5ohD3GOrWuKcuP/lO8aCGTymSbKBkLfxYzkC9pQsnvZ/viV8QDfG4Y4y0IidUItZ4DAX wT1pAxSLwd+HucwZqhIt1gFjuxh6tWNVMRCRJBq8JL4r8FlZ7Og4YHW2qqDTRp03k5A0QN/E3i9Ny ouGoO+dayMf2iWJIDOWxmAf+gQTfEOOQlulIxr2NI++aT8Zm3yAl44HrUhv7OQG2fI5VXXTxvhD+L 6yS9yLOEwq0qfqQ3PnCt/M8nWHnhTXSUuecG5OkcYCvlF1e9lmA1JfxBN35Gyl2B8TvLBFukiOs+l 1km4tciwtXZXMjNag/zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwPJH-00Gf8P-SY; Wed, 01 Jun 2022 14:26:57 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwOuQ-00GTBO-0a for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2022 14:01:15 +0000 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 AB950B8175B; Wed, 1 Jun 2022 14:01:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B8DBC385A5; Wed, 1 Jun 2022 14:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654092071; bh=qToVZsXl134a53xo2VcsV0MaOUoIecEvvSYgrba1pOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hbchicdfftPpeVVO6pNy5RwfQWz/2cI1qrNhhr0go17Zvv8jicG9tbpVPGJ43da7L ipgJDHULdo1KoDJFjFjn8uUiIO2NsNUSs0RoZbBj1RwjBCUuNATpABufJJeLn5yJa2 1jrdaHASVm/d4zjAOpkasFiOh9DXH/K1c3U1n0rBh1J4zyGPZb/qXseHCQZVosypll bD8VJdgqNUqJGocg87nygAq/2nqOY+qZMrcMWt3fZd7KkzNz6+TeyFix3TZusA5h9w gOqWhSgsqunJzKn/VBwDYSVNnxI0St7lU1wr+OvzBSMmPoFhoV9bymL2t5vGFcIT9r 0lg12qYnFjWnw== 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 4.9 05/11] ARM: versatile: Add missing of_node_put in dcscb_init Date: Wed, 1 Jun 2022 10:00:54 -0400 Message-Id: <20220601140100.2005469-5-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220601140100.2005469-1-sashal@kernel.org> References: <20220601140100.2005469-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220601_070114_237775_011F98A5 X-CRM114-Status: GOOD ( 12.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 5cedcf572104..3e86cff1d4d3 100644 --- a/arch/arm/mach-vexpress/dcscb.c +++ b/arch/arm/mach-vexpress/dcscb.c @@ -146,6 +146,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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel