From patchwork Wed Apr 20 01:23:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 66145 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2178183qge; Tue, 19 Apr 2016 18:23:49 -0700 (PDT) X-Received: by 10.98.78.68 with SMTP id c65mr8398275pfb.7.1461115429407; Tue, 19 Apr 2016 18:23:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mz1si15081332pab.72.2016.04.19.18.23.49; Tue, 19 Apr 2016 18:23:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753342AbcDTBXs (ORCPT + 7 others); Tue, 19 Apr 2016 21:23:48 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:54768 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775AbcDTBXr (ORCPT ); Tue, 19 Apr 2016 21:23:47 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id u3K1MZ5P029665; Wed, 20 Apr 2016 10:22:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u3K1MZ5P029665 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1461115357; bh=ylNykB7AOE1wXvS1Rj7aK8hJbdF8WfeqrxGeUCIAE10=; h=From:To:Cc:Subject:Date:From; b=aM3ciPkhyKyD/sOD919+N6pAvbT/gHL9ECCu+MLB5VQ3XAXCn+I9rSEJisKKMLo40 CLWE6KSYmIyhht35+tyltB77iTD5KEu0dOOsno+mSjp7gg60Zo/Orw7Fv1LveHRnBo C/YsEUsjNaG7pxm03uO+EMHUYPgXuHBQP2qjN3ns/HaeUeKnhTO6aByPFc7XzQdmLF slWGCx80xTXH2xfEePtsDS5UB4A+bdF3YfbqM7ILfqTwa88Gi/bFpB6Pmq9/2onYA3 326FvvEm8sv6NXxbJZpSb4jkiSM5DHdid5fhm04mRueSuU2DRFp/NAyr7Gd5MTHYCt woF5D5tpbqS1A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org, Mark Rutland , Rob Herring , Masahiro Yamada , Hanjun Guo , Lorenzo Pieralisi , linux-kernel@vger.kernel.org, Sudeep Holla , Will Deacon , Catalin Marinas Subject: [PATCH] arm64: spin-table: add missing of_node_put() Date: Wed, 20 Apr 2016 10:23:31 +0900 Message-Id: <1461115411-2843-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Since of_get_cpu_node() increments refcount, the node should be put. Signed-off-by: Masahiro Yamada --- arch/arm64/kernel/smp_spin_table.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Will Deacon diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c index aef3605..18a71bc 100644 --- a/arch/arm64/kernel/smp_spin_table.c +++ b/arch/arm64/kernel/smp_spin_table.c @@ -52,6 +52,7 @@ static void write_pen_release(u64 val) static int smp_spin_table_cpu_init(unsigned int cpu) { struct device_node *dn; + int ret; dn = of_get_cpu_node(cpu, NULL); if (!dn) @@ -60,15 +61,15 @@ static int smp_spin_table_cpu_init(unsigned int cpu) /* * Determine the address from which the CPU is polling. */ - if (of_property_read_u64(dn, "cpu-release-addr", - &cpu_release_addr[cpu])) { + ret = of_property_read_u64(dn, "cpu-release-addr", + &cpu_release_addr[cpu]); + if (ret) pr_err("CPU %d: missing or invalid cpu-release-addr property\n", cpu); - return -1; - } + of_node_put(dn); - return 0; + return ret; } static int smp_spin_table_cpu_prepare(unsigned int cpu)