From patchwork Tue Dec 6 17:10:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 30440 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2942796wrr; Tue, 6 Dec 2022 09:11:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf5aqaZhytTeZsoxzYju4ynt8o4iINyYN+vHMa3Ho0TRTAdsf+y0jgaWrSEOtTf8ProcWO1h X-Received: by 2002:a17:90a:8998:b0:219:a032:1764 with SMTP id v24-20020a17090a899800b00219a0321764mr18774551pjn.84.1670346711170; Tue, 06 Dec 2022 09:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670346711; cv=none; d=google.com; s=arc-20160816; b=hqeseFACagrdP1vnfs8ERyWhTLo2dazwBPKsjcNq4fm6kCe1cqzm/T8aoN7qCyt78p RnMZoqfilFtZivSxMNtm5f7OO0Vwd75FeSq+rYbky8nHoL+iCgwi8zenkYurEQUdUCqQ D4em7zzV8tO/9aIiO2GqNEXlydn3Jj06VKyS5oJtVgVtdaxI4pOj9OR84uhOB48iA40l tOR1RaPI8Kerzjv2Ani9nEcj+L/av+/c3Bntbj0ENQfSGLUapfLeoDtnfMCFzAVXkvmz FA23W4VGLTntaJACZFeZGwTLl0EGL8YRUHictLdfEgOoZ3/TfRzDNocsWJTGKWetu57b 00zw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+0eEedGwGTs0kfi7RPmjpdf2WkKmieSTXamBFgfWsLQ=; b=JXlmEJagAsIa1jJgfL+emb5FjC1UdnayA8z0BGgRAyhd+AsIde5tQ8UfRXvEyAc8mF PWPfGZy7WPEYghUt04H4r2RRNgMKMJ0Hx9amStpAgpKbji0JKb1CGFAalb2OW0Bww1Jo iUAN9kDfFk7GF74w5Uz7XdSmsFf3EYCvOR3ONNC1C3b1kwAbQfhDwyNxYAvE4cZAdeJl r1JD9CExFjVoeFVgz1PEd0O4Xlbh01sQtpPIbiAZrA0IB7/hnI87YSTYYMgfbP9QOYXU ngkc0FXq/lTzG/y8UmCgTUx95CoM1w6jompWLnZRV0la0u+XoUP8uNBiXfqiaml9JbuQ J9xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dyXoW4R5; 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=amarulasolutions.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020aa7938e000000b00576abbc404esi8346693pfe.238.2022.12.06.09.11.38; Tue, 06 Dec 2022 09:11:51 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=dyXoW4R5; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234347AbiLFRLS (ORCPT + 99 others); Tue, 6 Dec 2022 12:11:18 -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-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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751485473262721486?= X-GMAIL-MSGID: =?utf-8?q?1751485473262721486?= 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) np = of_find_compatible_node(NULL, NULL, "fsl,imx25-iim"); iim_base = of_iomap(np, 0); + of_node_put(np); BUG_ON(!iim_base); rev = readl(iim_base + MXC_IIMSREV); iounmap(iim_base); From patchwork Tue Dec 6 17:10:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 30441 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2943289wrr; Tue, 6 Dec 2022 09:12:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf4v61bizY8TCnaZbvu90PxzbzMBzRd5hfK1PzsUu/zIqmUowxXWegrcCO6i6J1BYHRd0sLl X-Received: by 2002:a17:903:2309:b0:189:c7f1:c298 with SMTP id d9-20020a170903230900b00189c7f1c298mr16263889plh.152.1670346770296; Tue, 06 Dec 2022 09:12:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670346770; cv=none; d=google.com; s=arc-20160816; b=UIZTRgrTEqpjbQ6mlWhgfOAwSGV1UNcmG8P9bwIS4quC9uh9rRCRyZGNe8iGQ89KCD p+dTD34WAu2uHdgNprEKaWKS7oq6s89E8/Eugf2bK/vbeBlyhk8beMqjMCs4DRN2iUHP CjLXT/3VBTTYpAaEr71f0YtspHjM62pxklXiHySh6BlzAWxxqyw0y4SyF8AQ3C+xwLwI EkYoifJKPFFSQqXtXEd5BQuZ5dtnb09QX03ziyK+YmmDTe6HE7nC8KMgcWFz4gN88JMu Q0ewR/s2iSCiHLnoE6oPFpptw+sh6XqLALL3V29xUsDFj9VkvQCTGIPjoq6xXX/Rk+qK eCzg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YmzucAOYeRO1Za2FBpNv+O/C9sORhwUJDwZR4toHbGw=; b=hIXpbg+CrAmkUT+U69lrdCAPipW3HjvuQSOtQQQ6UXLhMeja03vvOW7omUNDWH0PYY HnHYbO2nqLWeP+4CIFn0rIVV1dS2RMBckHptXPt43eymHHCAaIJPLOc8wzeIjxbPQHJA OUOkevXL2TApjhUv19zklmp8n4x2mA03JU6CzODWYigL9ZECSdCHjM+Lscs67uqZqJf+ kxL/F9/gIyYufbhV0NWvPi7lTqCMurYg/6YfCwEb0W6qZPRtQ8xTCgaRwxt7TjA2U9wX L42NCAoo2wx7OM6ca9qPt0tY7ViMj4Lh+MYEtm3UMzumnPM2XNIz6SBAZ6Wjuibknnv1 Grcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MkbkbT4e; 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=amarulasolutions.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a170903110d00b00188db3c4b73si19175898plh.269.2022.12.06.09.12.36; Tue, 06 Dec 2022 09:12:50 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=MkbkbT4e; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235566AbiLFRLW (ORCPT + 99 others); Tue, 6 Dec 2022 12:11:22 -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-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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751485534686846612?= X-GMAIL-MSGID: =?utf-8?q?1751485534686846612?= 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 devicetree") 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) np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm"); ccm_base = of_iomap(np, 0); + of_node_put(np); BUG_ON(!ccm_base); /* * now we have access to the IO registers. As we need From patchwork Tue Dec 6 17:10:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 30442 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2943307wrr; Tue, 6 Dec 2022 09:12:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf6mRU2P2fkvKOIrEMIfOYiAYx9SvZhUEPU4kJ1NKzROGiq/1S2m3OFItAOmpe5DSbK2uQ6j X-Received: by 2002:a17:903:452:b0:189:65c5:4508 with SMTP id iw18-20020a170903045200b0018965c54508mr57538050plb.66.1670346772627; Tue, 06 Dec 2022 09:12:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670346772; cv=none; d=google.com; s=arc-20160816; b=azxdw/BP8W9Y9rnBEgEsgKe5O+YFymNxNtTghuOlR7eju8lC8WDQeGA9qgPHEnRFmu QT6Xhxd8Y0Bvo3QvLo4dx/Blg7vrhi+nM1k0Cd0Gk3XZJeTnoIzbV5FRc6tnq3Wg85PF EsyGeSfHbAnJcdc1CvNNnhRgjvnzwjUV2uXcObwYp/djCNuG3V7tze8smNrAU1HY40M1 UkQJWTJOK3TwqEa94uzjqHPNO49MjHrPvMpTNanDWC5FvHpfRhc408Y1WnDIaBPmeul/ FJKVkh5j0a97f1X9rs0uE0EI+yin42gSzFc5A/iy4VdItQOW0lZNKkNchnFfYJDk+29r H5Gg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5v14ZTzRH5HsyEn9mY20Ymo8gJAzpokyO92zkSj5WYg=; b=Ud42EcQoemLt9LCWEersSmjNrZP/BeLOELD6WRNW0dDERWReJ0HcQiB6MerHZfrifi h1zDMmbfk4X2LfRt96WHRfCMzkOeD/w1BHEOV3YkBlRPljVOix5ON4UOfQl6Wizvmrym eVlwlQL2OO0aoOwADuiN4/9IOiLeX67iZh6WvhLJkbO7mOSVH1um3tNfYhJOUQ9w7iI+ puQ5/kEiRHra6NM8a8qvlILHnHvWpZa3Dhi0vMh6qoKWyQoMwdoFDM4bBFEbk4MVxYE3 7vU7wH+KyUzlQAckqzFTYtpUz4rvh7ZM1ZTfKA86Y2GY5uYLgHK3K0C2N6hz7IozZ1xs NoTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=liDhJDy7; 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=amarulasolutions.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a62d105000000b005761cb3b171si14536333pfg.250.2022.12.06.09.12.38; Tue, 06 Dec 2022 09:12:52 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=liDhJDy7; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235657AbiLFRLZ (ORCPT + 99 others); Tue, 6 Dec 2022 12:11:25 -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-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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751485537473018445?= X-GMAIL-MSGID: =?utf-8?q?1751485537473018445?= 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 devicetree") 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) np = of_find_compatible_node(NULL, NULL, "fsl,imx31-iim"); iim_base = of_iomap(np, 0); + of_node_put(np); BUG_ON(!iim_base); /* read SREV register from IIM module */ From patchwork Tue Dec 6 17:10:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 30443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2943544wrr; Tue, 6 Dec 2022 09:13:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf6TTueeb+wqLxPCQSOvr3FIR+UpUDkQdU52tyC/dbuI5PGNcEQ0rxT2za2gwS7HGZ/j0/Zb X-Received: by 2002:a17:906:a107:b0:77f:9082:73c7 with SMTP id t7-20020a170906a10700b0077f908273c7mr56668442ejy.517.1670346798472; Tue, 06 Dec 2022 09:13:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670346798; cv=none; d=google.com; s=arc-20160816; b=emYO7SN2uGFHKtFaZUpVjFUF8mx5Er/Lh2sf/y9dT22XuaVBcQEP0wOTP6fDSq0+LM oetdUd0AZ2EMtPFwhSIFMgG9eMoTSnMDfjCpK5cLwCr4+Ap0gb8+g8LcSN+4K7F9ODda zUIeNIjK718x/PPlgRczhj+D8upIw+pdzv/3MJZA4tnZ72RYc5uYubPDkdFEf0hdGpdy ljdmjTeEsgtjt1/kuADV3mcmdFWLZu9V+NimJLYqHnI4s+xLRBA12uA8pYA71BhUQe7S suKsCBB3ygoYJAQdxrarOz8JUh10EYSANh5Hj+EY66SVelI+H0Ffv4lYAgTCM9zMIwnQ PiGQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JTKzSC4xiELtOhvYcPg625CE+pmvLexXVke2DqyU21Q=; b=ul39EHQsOkvdSy7TSGzmxvVUd0lgx9YsDtJWpUC4RyFzGi3aTOgIA0FpmIHQT/sc/C f4L8fLDoaqwjimJC+pKiLyS+Ej5qscKGfcbZnnXDylzMS0PMVw5F8kFdwTU2ZHtbZuXL 640/2xwaQBuqr116fs2kTJ+gbHjNKkc7axCnT4JLeb/6U3kTpfQEA0x6bi5csJ8LpgDZ 1A69UlbB1Ii6XA7Ukl53iyV7k0anumntJwR3tOGx6hWJeVrwuJftxyJFoLsANLcH8/+w s/il7ZJv6Yfl55RhNGUBPrLFyNdK5F606AP/QPJL0qj0DQDWROdVk2LhtHRXsTuJCVMG cjjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jBQD+O7X; 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=amarulasolutions.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz9-20020a0564021d4900b00468fdd316e6si2242385edb.542.2022.12.06.09.12.52; Tue, 06 Dec 2022 09:13:18 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=jBQD+O7X; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235663AbiLFRL3 (ORCPT + 99 others); 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-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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751485564277441566?= X-GMAIL-MSGID: =?utf-8?q?1751485564277441566?= 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 devicetree") 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) np = of_find_compatible_node(NULL, NULL, "fsl,imx35-iim"); iim_base = of_iomap(np, 0); + of_node_put(np); BUG_ON(!iim_base); rev = imx_readl(iim_base + MXC_IIMSREV); From patchwork Tue Dec 6 17:10:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 30444 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2943703wrr; Tue, 6 Dec 2022 09:13:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf6infgmw3FQBm1ihPLdBa7oxvbmmSgNBJz8Cm7UhJxbWA48dbuuO03dIfG+MlHo1lcZUamF X-Received: by 2002:a63:f00a:0:b0:460:ea43:93c6 with SMTP id k10-20020a63f00a000000b00460ea4393c6mr60790668pgh.173.1670346816847; Tue, 06 Dec 2022 09:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670346816; cv=none; d=google.com; s=arc-20160816; b=ZBYRDdWlIEF5qEIQRztRv6dHzr/4hbDqdV6EwWytnp5xczYGQNXd2++NptRkP0pWdL xjrSqJ0KmKvjZbY+8zh/Cqiy6lXToGVYSI4WHK0aO0CsHtHTfW8yPibF04/k4kQfcf78 7r8N1t+T8U6SHvUDRcteYYsr9KlDAtJaJtQY+qmBff57DCBpMVAFyuUZy8tu/EpQxOiZ H1wn+wlf11ve5ebcPEoXJBscnJy0GmyKTG5xqMqIlFPzbqZMYD+bhCl4dS8qvb++BJ3l rtbNGNyNhLYd446zkzYmXhTOJBabrydgg5EEhBJcK6tiUjxJPV7f1zTz3WSSUkBX3vYK ZqGg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=isZl4Ib1GW4IZeJsKLQaicOT0yx6KllCfAA6o2HK4Yo=; b=w6zY0mMlEG/umTdVO1lrFEBVNNcVAYvs7SpgGiM3F8kPKXOWzxAgj0Hjl58eLcCOin dsPAXQU/N8t/S3EnMzFtDDY/ny/sOSF/beIPpgbluALdFckhfv9R/p6TfU33p8lotU1t Ag8X9wVxHmudqz6fcKQabKYYCKEYglpj/USH5uDYG00/f+uLM/eeY220iB14lsLFsDlb n3MCly/6r9N3ceg0DuCsDkyoadcFnZX+b3OGCzSB5KWXeQ62nn/DXLJFgHsPvn0BuPzQ 5gzMW8Q+Ms5Z9eAFcGOAFWP0GgfXjLY7CHV820aj0TDmrg4+eOLOHF0fmFYh+c0TTz/M fN4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dEPxQkXm; 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=amarulasolutions.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h70-20020a636c49000000b00476e62744a8si17170374pgc.388.2022.12.06.09.13.22; Tue, 06 Dec 2022 09:13:36 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=dEPxQkXm; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231168AbiLFRLh (ORCPT + 99 others); Tue, 6 Dec 2022 12:11:37 -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-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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751485583778122913?= X-GMAIL-MSGID: =?utf-8?q?1751485583778122913?= 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) np = of_find_compatible_node(NULL, NULL, compat); iim_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!iim_base); srev = readl(iim_base + IIM_SREV) & 0xff;