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: 13066177 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 C3D58C3A5A7 for ; Tue, 6 Dec 2022 17:13:23 +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=Ddw9x2CprXc2zCV2x1nlxdPnUWmIq18M7PxgEVhA7dc=; b=3bS4vCt/MjCnaK LbKH901EUnfM4jBYgSLKShfnCnCkwcw1Qpnt97acthzQiV1WsXslifJCvW9k9db+O/PGHyW4KMomZ LgDZXE5g06GmAJjUOXNWGd7PnfVIkMUgFj/xqUX0f28nE3U9qZHFmxcFHUySTdWP0YqFRUI0fUvaF uLNuF8y5o95YZD3XfWN6Nr+gn3vhjx7DO1wO7WB7uw4IJk3H7rZ//EosYgYCcOfC/+AwKASA9PnQL 7CJfzIRfw6AUK1+dpYzel+BE8T64P0HdUCbbxfxCTtu2jf9p62f/L8wuHHUxbJnRR10IC2csYowtJ wjIqGzwuJsGdSPmZx3mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2bUT-00Fi2i-Jl; Tue, 06 Dec 2022 17:12:21 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2bTQ-00FhE5-PV for linux-arm-kernel@lists.infradead.org; Tue, 06 Dec 2022 17:11:18 +0000 Received: by mail-wr1-x42c.google.com with SMTP id d1so24400396wrs.12 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=NST7DWCVW+xnX0whjdS4+Km1dNzSJAFHybBpxwkzVX1Fz7rnmWT7yM1JLNUXvUNhph EAKBG8fgyhHRC09kkrj9DkFttdIAdQdXidw95840BlaEecH1cQwqJriUyMHzpa2VeBHw Dx09lslCSaaxEf4RRet5eh/UTPAOAwZbCsodOX5lOe62Jhr/xnfg0Z+wDKvjEw7p0CDu LJqOAtUquVHd8fmo5EVVaFO+eb6UyPXbzl3oI9NU4WzyR3N5RQzCa0bUVsXg2cr/wQIv 2TrXtp+iZDZ2SS6RcNpSpm+4JTm58tjXs57siJ8uDvyViIhC+qunp2bl5lNlmrGt5fNC +Rpg== X-Gm-Message-State: ANoB5pm5A19YyNCe/n9atyoSrIIML5JqtYF4TdjM0dgket9yOVpsGIwT uC+aXw8S5tPI7I5TeZunANH3Kw== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221206_091116_871189_0863748C X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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;