From nobody Thu Sep 18 10:18:48 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 A4EA6C352A1 for ; Tue, 6 Dec 2022 17:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234031AbiLFRLT (ORCPT ); Tue, 6 Dec 2022 12:11:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235374AbiLFRLK (ORCPT ); Tue, 6 Dec 2022 12:11:10 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D2B42409B for ; Tue, 6 Dec 2022 09:11:09 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id m14so24423126wrh.7 for ; Tue, 06 Dec 2022 09:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+0eEedGwGTs0kfi7RPmjpdf2WkKmieSTXamBFgfWsLQ=; b=dyXoW4R5nzvhrF2ArwJVeg/RNvPFTxGysEkFtaM0+/WmSby6JpBEEzAuzb6dm/IUrO loetYRVTWv84boZgega8by8OHA894AB3cBdImVYzS/zG45qSdtvD+P+IrHwFWTQ9kaNQ dbXYFqDbgEchx56LERT2IZVmK/P54IfFI/v7k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+0eEedGwGTs0kfi7RPmjpdf2WkKmieSTXamBFgfWsLQ=; b=mq/rpQttbtxUydYgRv2UYWqHNYJg8Vdi1hHpGgiEZLWGaCaQBsIC3s1rVatFh+dAkq xC6bi74xMOuCM2CV/Iu3dySH5jwwl4u3j5NzPpnnSf/UHYYuNq6qLPyHveTxxkLpFhU/ 0VK2pjyHl6QAqBMyCxtwcf3wfnn39vBnrQSiTm52x058q0dhjv0Dtq5DzucNXeNt30E7 NpYFLJLYKqqtNQNNfDTuglpuQ7zkz/ZrloAHZGBOqLZjyk20iO5PbuunnrLNI8xy4yFb EPTQIugHHRptVgnKMvQ34UGOSG3xlcUIjC6/immR8sW4lajyAxHenecRYIsYAowrWmoS ty7A== X-Gm-Message-State: ANoB5pkeoXMF3RJz9Nw8TtcnRhCSndahKcC080J/h1qtef7kA4hebpUF H/eMdwtzXRAyRRkZVGwMVqy+gCGG6bhj3GzA X-Google-Smtp-Source: AA0mqf5VYzXR0eKaEheU+DSuzIPtiiZXxadgFHz/ASXvN/BUlPG5unQLLOG06Nxd5Dcsf4wUCuWsVA== X-Received: by 2002:a05:6000:18c1:b0:236:5d8c:97fd with SMTP id w1-20020a05600018c100b002365d8c97fdmr54257190wrq.473.1670346667896; Tue, 06 Dec 2022 09:11:07 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-82-54-95-136.retail.telecomitalia.it. [82.54.95.136]) by smtp.gmail.com with ESMTPSA id k10-20020a056000004a00b002365730eae8sm17298534wrx.55.2022.12.06.09.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 09:11:07 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Dario Binacchi , Fabio Estevam , Martin Kaiser , NXP Linux Team , Pengutronix Kernel Team , Russell King , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/5] ARM: imx25: add missing of_node_put() Date: Tue, 6 Dec 2022 18:10:45 +0100 Message-Id: <20221206171049.3316611-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> References: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> 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" In mx25_read_cpu_rev(), of_find_compatible_node() returns a node pointer with refcount incremented. Use of_node_put() on it when done. Fixes: 8b88f7ef31dde ("ARM: mx25: Retrieve IIM base from dt") Signed-off-by: Dario Binacchi --- arch/arm/mach-imx/cpu-imx25.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c index 3e63445cde06..cc86977d0a34 100644 --- a/arch/arm/mach-imx/cpu-imx25.c +++ b/arch/arm/mach-imx/cpu-imx25.c @@ -23,6 +23,7 @@ static int mx25_read_cpu_rev(void) =20 np =3D of_find_compatible_node(NULL, NULL, "fsl,imx25-iim"); iim_base =3D of_iomap(np, 0); + of_node_put(np); BUG_ON(!iim_base); rev =3D readl(iim_base + MXC_IIMSREV); iounmap(iim_base); --=20 2.32.0 From nobody Thu Sep 18 10:18:48 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 D22A9C352A1 for ; Tue, 6 Dec 2022 17:11:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235604AbiLFRLY (ORCPT ); Tue, 6 Dec 2022 12:11:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235227AbiLFRLL (ORCPT ); Tue, 6 Dec 2022 12:11:11 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B978F2FA5B for ; Tue, 6 Dec 2022 09:11:10 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id bs21so24440579wrb.4 for ; Tue, 06 Dec 2022 09:11:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YmzucAOYeRO1Za2FBpNv+O/C9sORhwUJDwZR4toHbGw=; b=MkbkbT4elwmyTpFZMWHeouGW8MXnzkaicMClIaoEPhafVK6G/gOdEqkoCthjepgvjI zEqKhpIuaBMlQNFJh2elQbq49ozfBehJl8b7swZPkU8nDYLb2edrIvRhKfoRaWLFoI2I CjpxHQ0b/PEP/AKvsDPjtQ21In0cGNlRH6rBs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YmzucAOYeRO1Za2FBpNv+O/C9sORhwUJDwZR4toHbGw=; b=24L9pbc33pt3b4qH5o7BbJoHzvn9FJTfEHYGCBTjrLaBXSYgNTWGWRERq8HV3WPdCp NzO67af1e8cYYWk+Kjq1XrMxD2xmt1MGb+pPLVGyjWkzW9utNc2jXR+cHr3hIkUfHZM3 BCdf6qFoA4IMakTgWXJEj6jQFcIAhorI0YcNqIJ3NKPE1stdX1EfuImgQD5w/5ATekOP i3RASmPadP+lBmJ1cuYI+i+zYGvmneyVsLPVTxnM2zdZKZWGCsil5clPkjPCWPJQTkbk 2AYPd01fWG93UQEmih0drrMhTRsqd8htiuP2/S6OT1yIJenfS3/BY57hKuQT8NVuIRPs uHUA== X-Gm-Message-State: ANoB5plFmJduH4JcYeB16/ckp6InKFyTQVHGB+XzBR5N0qQn38tv/+aM vkPnb81ZyiulaAKjAprLnA8XcG6FtJ1VKUow X-Google-Smtp-Source: AA0mqf4Wm8rkIFD1VSowgEiyUmqd7dnA3qkC4S1F8gLh99B7TegLePQHEbez1bAclFIrsmYtMKkLtA== X-Received: by 2002:adf:ff90:0:b0:242:46f1:1de0 with SMTP id j16-20020adfff90000000b0024246f11de0mr10925436wrr.640.1670346669143; Tue, 06 Dec 2022 09:11:09 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-82-54-95-136.retail.telecomitalia.it. [82.54.95.136]) by smtp.gmail.com with ESMTPSA id k10-20020a056000004a00b002365730eae8sm17298534wrx.55.2022.12.06.09.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 09:11:08 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Dario Binacchi , Arnd Bergmann , Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Russell King , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/5] ARM: imx27: add missing of_node_put() Date: Tue, 6 Dec 2022 18:10:46 +0100 Message-Id: <20221206171049.3316611-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> References: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> 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" In mx27_read_cpu_rev(), of_find_compatible_node() returns a node pointer with refcount incremented. Use of_node_put() on it when done. Fixes: 94b2bec1b0e05 ("ARM: imx27: Retrieve the SYSCTRL base address from d= evicetree") Signed-off-by: Dario Binacchi --- arch/arm/mach-imx/cpu-imx27.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpu-imx27.c b/arch/arm/mach-imx/cpu-imx27.c index bf70e13bbe9e..1d2893908368 100644 --- a/arch/arm/mach-imx/cpu-imx27.c +++ b/arch/arm/mach-imx/cpu-imx27.c @@ -28,6 +28,7 @@ static int mx27_read_cpu_rev(void) =20 np =3D of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm"); ccm_base =3D of_iomap(np, 0); + of_node_put(np); BUG_ON(!ccm_base); /* * now we have access to the IO registers. As we need --=20 2.32.0 From nobody Thu Sep 18 10:18:48 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 E1C8CC352A1 for ; Tue, 6 Dec 2022 17:11:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235659AbiLFRL0 (ORCPT ); Tue, 6 Dec 2022 12:11:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235432AbiLFRLM (ORCPT ); Tue, 6 Dec 2022 12:11:12 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04F3F2DABB for ; Tue, 6 Dec 2022 09:11:12 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id w15so24416735wrl.9 for ; Tue, 06 Dec 2022 09:11:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5v14ZTzRH5HsyEn9mY20Ymo8gJAzpokyO92zkSj5WYg=; b=liDhJDy7GxeAOMF/LzJSmXP1wdT5+iq4LBiLncSq2Xj1dmUStASD9aScVhhvdFuL6R G2a1AUzuGUMecb/sYwv1ZH8DqCqE4SSC+cDIHK0cBPBceWOPkZR4Zvvr+v3gluXm0+EI Dt2bJ/n4s6zWupvA7VQFg3g0hGhiyLmALr5U8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5v14ZTzRH5HsyEn9mY20Ymo8gJAzpokyO92zkSj5WYg=; b=hUugGTxWHuSqtTMwJJAYvH0AV0mqUACD5rJVcPgkPJGO6U+Bh8xTvYH8wmt9/0QkYB /2+rrKZOciYBDlKqTQDvqZupElnbtjeHlXdtp4+sKRnA84ViEDqp3DeBPcuw66Q0xk4I GWDlQeZA4gSuP7NvV8rnJVqZx09OJksb5WNzn+7yNAIxwGE3U29N4aUNEz/RhsAdFvM2 AqYKXoM2b68lIri4z6YinMUVHPtRDgLwhHY0Cqjv1FqiK+hrQru2e79KiMnEhUwhYiCr q8Hztfd+McQxBO91VeuAhPAplIZ4QBp4ZWLAoxKSoC1MbcNUHchs0ab1J8tbCzC8mwZT HwkQ== X-Gm-Message-State: ANoB5pn+y54qdz5a1J2jM1+h3Yj3NvCB/9wta7i883XXz9lWkhLqFmsp 5jAdeb+KVQBd/9gO+kBH9P0I2zJ5oiDeMyV5 X-Google-Smtp-Source: AA0mqf5rVnGYyi6nQo2ffozLqpG/dpJo+1+F9RpCIVSPq3Ms5qsq2nMwoa4dGTdeTh9jFtNJ7uqSeA== X-Received: by 2002:adf:e98f:0:b0:242:7f7f:da0a with SMTP id h15-20020adfe98f000000b002427f7fda0amr426399wrm.168.1670346670455; Tue, 06 Dec 2022 09:11:10 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-82-54-95-136.retail.telecomitalia.it. [82.54.95.136]) by smtp.gmail.com with ESMTPSA id k10-20020a056000004a00b002365730eae8sm17298534wrx.55.2022.12.06.09.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 09:11:10 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Dario Binacchi , Arnd Bergmann , Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Russell King , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] ARM: imx31: add missing of_node_put() Date: Tue, 6 Dec 2022 18:10:47 +0100 Message-Id: <20221206171049.3316611-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> References: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> 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" In mx31_read_cpu_rev(), of_find_compatible_node() returns a node pointer with refcount incremented. Use of_node_put() on it when done. Fixes: 3172225d45bd9 ("ARM: imx31: Retrieve the IIM base address from devic= etree") Signed-off-by: Dario Binacchi --- arch/arm/mach-imx/cpu-imx31.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c index b9c24b851d1a..35c544924e50 100644 --- a/arch/arm/mach-imx/cpu-imx31.c +++ b/arch/arm/mach-imx/cpu-imx31.c @@ -39,6 +39,7 @@ static int mx31_read_cpu_rev(void) =20 np =3D of_find_compatible_node(NULL, NULL, "fsl,imx31-iim"); iim_base =3D of_iomap(np, 0); + of_node_put(np); BUG_ON(!iim_base); =20 /* read SREV register from IIM module */ --=20 2.32.0 From nobody Thu Sep 18 10:18:48 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 4588BC4708C for ; Tue, 6 Dec 2022 17:11:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235666AbiLFRL3 (ORCPT ); Tue, 6 Dec 2022 12:11:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235486AbiLFRLP (ORCPT ); Tue, 6 Dec 2022 12:11:15 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C61F2D76D for ; Tue, 6 Dec 2022 09:11:13 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id h10so14889574wrx.3 for ; Tue, 06 Dec 2022 09:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JTKzSC4xiELtOhvYcPg625CE+pmvLexXVke2DqyU21Q=; b=jBQD+O7XNs5SbP+46Ou8Fyj8CECu5cE2sdTpHJmBujn+wNPZOhaoLoKc0GCA9Gwq+G 1W76vEZ8MT1Ki6hKHJmSamfFN23/9WUPMg3FLo5RE+CBZw8/MKoEOrQcCBc6raTMcr6m awNNnOPDL1KREISMcuOhPUhoWkJRWzRXpKnqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JTKzSC4xiELtOhvYcPg625CE+pmvLexXVke2DqyU21Q=; b=3Q9N77Shutp1fcaosCr9SGmYFtFvPUeCmHFvDxVZ5XXfHyl9SaZZaIB2hD2JA5/lKC zfEHT6ogpU/12TlSoKussdEcsKkJG9CN48duhKMPGxMAHwNvWha3T/Fzg/lZK2a3zqC+ oh81uYgUcA1vxoxm5KU4sVNLBjBL7bEs+ujKwvIdLWLOi9Rsl5wPnQlGcsEFwy4OmqzV bLN+Nra53HEvSPnJ+UCPQeo7Qt6g9rnGZD/FydNYq2S+xJYhxmddVCo3dvIY+nbGkjPD 1IkVdbmYHNO8Cs9zkncb5YkG5kACPO6RqXBcWWpx0AKdVbvXsWlcLTmoj1wjo7BuAf+6 GUAA== X-Gm-Message-State: ANoB5pm/f1PLurEQkM4SaInWqu1ip8Mt070TwLIt+bxwZpf1FsU4jxeb l63NfpRFmJdYSdth5PKVrbzfCySQDmybOd2T X-Google-Smtp-Source: AA0mqf46qOghPsTK5SHdLa1G/B2hktQOKTAgXMfUJJ8bJ8Lem5+VEr3rDWh1zK2Rir3AyuSd6Vrewg== X-Received: by 2002:adf:f54e:0:b0:242:1534:7b57 with SMTP id j14-20020adff54e000000b0024215347b57mr26622429wrp.404.1670346671934; Tue, 06 Dec 2022 09:11:11 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-82-54-95-136.retail.telecomitalia.it. [82.54.95.136]) by smtp.gmail.com with ESMTPSA id k10-20020a056000004a00b002365730eae8sm17298534wrx.55.2022.12.06.09.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 09:11:11 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Dario Binacchi , Arnd Bergmann , Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Russell King , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/5] ARM: imx35: add missing of_node_put() Date: Tue, 6 Dec 2022 18:10:48 +0100 Message-Id: <20221206171049.3316611-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> References: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> 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" In mx35_read_cpu_rev(), of_find_compatible_node() returns a node pointer with refcount incremented. Use of_node_put() on it when done. Fixes: f68ea682d1da7 ("ARM: imx35: Retrieve the IIM base address from devic= etree") Signed-off-by: Dario Binacchi --- arch/arm/mach-imx/cpu-imx35.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpu-imx35.c b/arch/arm/mach-imx/cpu-imx35.c index 80e7d8ab9f1b..1fe75b39c2d9 100644 --- a/arch/arm/mach-imx/cpu-imx35.c +++ b/arch/arm/mach-imx/cpu-imx35.c @@ -21,6 +21,7 @@ static int mx35_read_cpu_rev(void) =20 np =3D of_find_compatible_node(NULL, NULL, "fsl,imx35-iim"); iim_base =3D of_iomap(np, 0); + of_node_put(np); BUG_ON(!iim_base); =20 rev =3D imx_readl(iim_base + MXC_IIMSREV); --=20 2.32.0 From nobody Thu Sep 18 10:18:48 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 66C88C352A1 for ; Tue, 6 Dec 2022 17:11:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235696AbiLFRLi (ORCPT ); Tue, 6 Dec 2022 12:11:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235505AbiLFRLQ (ORCPT ); Tue, 6 Dec 2022 12:11:16 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0C9F2FA79 for ; Tue, 6 Dec 2022 09:11:14 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id u12so23473026wrr.11 for ; Tue, 06 Dec 2022 09:11:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=isZl4Ib1GW4IZeJsKLQaicOT0yx6KllCfAA6o2HK4Yo=; b=dEPxQkXmaa3Wz4HA8Yfy4fjbqIBuD8Ml8aDTOT+KBrwUbxD+kTSbbJTMFiCypHQQy0 EdWFSrsW0nLMoZS9mdzEuuPi3t0rCF2jSEWf661q7y6nP9OosPtcKIxPFfr2X2iiPdMZ isoMpp4rHtsiKXLJ7En2CQMGDu3H0HQlGE5as= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=isZl4Ib1GW4IZeJsKLQaicOT0yx6KllCfAA6o2HK4Yo=; b=AG5cPkRdsFLGtKe+bvyJL3nUAAwnAo2bkWZgH/aFhbylwyHnQGAwmka+9KBvgM9mFP dUaHq6sLDamp6budJF6bhfXdQm1KpuM4gC6NAEFnGbHdsq3P18wucXjlxlpWXOllaVWf fNSoVEyAqVCWgPYyP7UNKOPYMIfZPkRRzYjzJ7iEsiy8XX1i5fa1iqbOLZNRGQkMJQbz uRJAHQkAxCdQ/41Su6lcH5/rVRAnw+XWRhHFC8bH1SQIMJr7QcYHH8tIb+6nFJ13rh5N gicdhdAQby7sOoex+rtgoV/rW9McQw2AkOano4RpoUjB5uixbof08F4/hCu30rkus2J1 pmYA== X-Gm-Message-State: ANoB5pkZ43BkiGDC9Lb4M8y4CmREOi3AnT9O+NK6Rlg72vf2FtX5QJvd hyRlIQZB/Ptc9A8BWDCt93Lm0SkNmqAThTCw X-Google-Smtp-Source: AA0mqf5HkhTdPQ7nLSvemacCYX845ggXLdSFFWJJy2A++pl3KnIlWOQwnMoPoDxTURKlIWKDNu6RrQ== X-Received: by 2002:adf:d1ca:0:b0:242:fce:543b with SMTP id b10-20020adfd1ca000000b002420fce543bmr28536302wrd.244.1670346673302; Tue, 06 Dec 2022 09:11:13 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-82-54-95-136.retail.telecomitalia.it. [82.54.95.136]) by smtp.gmail.com with ESMTPSA id k10-20020a056000004a00b002365730eae8sm17298534wrx.55.2022.12.06.09.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 09:11:13 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Dario Binacchi , Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Russell King , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] ARM: imx5: add missing of_node_put() Date: Tue, 6 Dec 2022 18:10:49 +0100 Message-Id: <20221206171049.3316611-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> References: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com> 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" In imx5_read_srev_reg(), of_find_compatible_node() returns a node pointer with refcount incremented. Use of_node_put() on it when done. Fixes: ee18a7154ee08 ("ARM: imx5: retrieve iim base from device tree") Signed-off-by: Dario Binacchi --- arch/arm/mach-imx/cpu-imx5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c index ad56263778f9..a67c89bf155d 100644 --- a/arch/arm/mach-imx/cpu-imx5.c +++ b/arch/arm/mach-imx/cpu-imx5.c @@ -28,6 +28,7 @@ static u32 imx5_read_srev_reg(const char *compat) =20 np =3D of_find_compatible_node(NULL, NULL, compat); iim_base =3D of_iomap(np, 0); + of_node_put(np); WARN_ON(!iim_base); =20 srev =3D readl(iim_base + IIM_SREV) & 0xff; --=20 2.32.0