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: 13066175 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 25A45C352A1 for ; Tue, 6 Dec 2022 17:12:53 +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=yitbQJL4J/L0Vp31EflNgB5Ry4XDRc9kOCHSbJzMB54=; b=EzOgZVefT570Uh rZ2rPcJVwmewZBOc57C2TWTolqaaNMA7ALj7uHdFdPIbBNIyizaWBfVVrMDr6wcBpEmBJH4pIzEwL xwdV3Pq0CkLk6re/D+FZL5IK1AE3yOCICFYeY+JQLjTHcDHy7zaCwVxQHORtu+FtJ5i2RLDNzEGC7 ZAoBuACE/q08E1t8GKk88pmpAQ4hrLv/Iz69VHVI8OEAZHR5+EY6APgo9l1uW5O9X73z1rVteJufI GmZrIyTGhmUWhNuYKvduwy/ASo/bqowMEPuOvWeyGzYsEaLT8jVa8lS6epTU5HRLbi3szIVdHtSDO 3JYcYL75fVPV/EEf2YVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2bTw-00Fhe2-29; Tue, 06 Dec 2022 17:11:48 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2bTN-00FhD0-Ua for linux-arm-kernel@lists.infradead.org; Tue, 06 Dec 2022 17:11:15 +0000 Received: by mail-wr1-x436.google.com with SMTP id h11so24371043wrw.13 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=xvvqIgMSVXGixSOENMlD/l0WvEssnCgbXnp//FvNFjPr4fSeW4XXg1VPVNtw+gD1Nw lVvGu3w1nIkIx3WmO4Aa3HMjcV0O3hYoAvJlZqUH/Jrhs7WYhxWvS+P5zbPNBlC2LD4z 9S+ran5bPwVIUApS2x8BJoZboc8fc8H18BKc4GeXmdTC2EKp8LU7Hy2gTa4G0rLUTnh/ 3Yt/XU9Q+zi23MARl99EdkVjA2ZTf+S3MIEz1F5SiZmQk8RnExXe+9mQeMP/tH4apKQJ vMZ/H2m1eI1gWvMQalWaMYc//NX7lBfl5vLvQ88CiaQnUBGmpqwB7mSnxAS/onPWRgbn 2sfg== X-Gm-Message-State: ANoB5pkZFKoXfKE9L2E49pUsc7KjWBH8JxjS9K41jUZ8NLwbtynV62ri kXPrJ9ro9xss1NzMGw6wsgo/BA== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221206_091114_007710_54A0E20D X-CRM114-Status: GOOD ( 10.00 ) 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 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 */