Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1338657rwj; Sun, 18 Dec 2022 06:30:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf5hvZRtEeDUbm0qEnt/LkosEPhycMgmCjf0WEYxSUl7Eb/xMS/qZW/J6iAvB77i83IazcUA X-Received: by 2002:a17:902:ab0c:b0:189:d8fb:1523 with SMTP id ik12-20020a170902ab0c00b00189d8fb1523mr42294948plb.36.1671373843974; Sun, 18 Dec 2022 06:30:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671373843; cv=none; d=google.com; s=arc-20160816; b=JLmKTq/DZHm6nwQwQpqPLRFR/pDPJI3+y34FHo54QsfuC1Ngu9EzMkx9a06mcoDz0h aYkUJU8YkS3Eou/PgBl5FTSyK6DPqJDrXHmnGG8C1jonSZsx49yHpiXND0Ebdfg5ktiS EKzw3txP/RMnwVhJjW3S/j5RNqL8KVQPeSSoecdja5AkF6ojeIr1OK3ldYkqQWL2mqov UmDWGxcTFWaxx0lfXrmKoSSvs8vq4Dgx63BPMJwRJCSvlDkjwN/YA/1HqJYaxYOJLetg C1feFskA0KGIS+Tk/Av71CMcwjBrs1uOt6Z0L/Qps9rnQBbu9pd6UNk50+4s1M0sNI3u Rmqw== 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; bh=So1j1hYqFXtJEFIACcVh9kSp0AmYmRqnPJx+iGopj2U=; b=VqpdprwUelEi6dH7rTFLXfGBVHk84etVXmqoq5x5XUGK5KRAhZt27TF1bIjz4MmkMk 0ql50bC/HMAtnTQ4PATAKcJGG4VydSMuoX6aizgtNTdVO/wecGJ9k2yh3hi6psIPXovt 2dtUgdT6+/rV16ey8GlEZ805/rsPESMBJ99N5rBJ1MSz7oFjj+9CGMLA9e433KWNcYDf 4p6R+bX0JcLZsUFl2y7XJWDlFpjUvi/PT9NCuFwFqEtGGqovElAZXlHhi75vj1p7xvbT gH2Z5BKwIXMP7emz/l6VCZUsqz5j25JW8Z429FY89u8U9F+xpM90Tsi7CU0mf+7y5T4E EL4g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a63e006000000b00462ed110adbsi8250447pgh.316.2022.12.18.06.30.35; Sun, 18 Dec 2022 06:30:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230460AbiLRO10 (ORCPT + 70 others); Sun, 18 Dec 2022 09:27:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230416AbiLRO1T (ORCPT ); Sun, 18 Dec 2022 09:27:19 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B9B07642 for ; Sun, 18 Dec 2022 06:27:18 -0800 (PST) Received: from dslb-178-004-201-210.178.004.pools.vodafone-ip.de ([178.4.201.210] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1p6udH-0007F2-Vr; Sun, 18 Dec 2022 15:27:16 +0100 From: Martin Kaiser To: Andre Przywara , Russell King Cc: Martin Kaiser , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: highbank: fix of node handling in highbank_init_irq Date: Sun, 18 Dec 2022 15:26:47 +0100 Message-Id: <20221218142647.394881-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221218142647.394881-1-martin@kaiser.cx> References: <20221218142647.394881-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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 highbank_init calls of_find_compatible_node and discards the returned node. We should save the node and call of_node_put on it when finished. Signed-off-by: Martin Kaiser --- arch/arm/mach-highbank/highbank.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 97ccb8c1b3cd..54eb1422ef8f 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -50,10 +50,16 @@ static void highbank_l2c310_write_sec(unsigned long val, unsigned reg) static void __init highbank_init_irq(void) { + struct device_node *np; + irqchip_init(); - if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) - highbank_scu_map_io(); + np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9"); + if (!np) + return; + + highbank_scu_map_io(); + of_node_put(np); } static void highbank_power_off(void) -- 2.30.2