Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp309232imb; Fri, 1 Mar 2019 00:58:43 -0800 (PST) X-Google-Smtp-Source: APXvYqz41aC9ffEBjRh6DtXx/Kc32OMa8Cd2Ab8m3QRAiP3FvA3J22WMz5NH8aE3XTHothDYiYEj X-Received: by 2002:a17:902:4124:: with SMTP id e33mr4348574pld.236.1551430723574; Fri, 01 Mar 2019 00:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551430723; cv=none; d=google.com; s=arc-20160816; b=lyDmKuEkLcNs9kEsFcY6n1s7P0aH+TrrNoI0ZW8zKPqyeVx+P/vwhPjbCOIwpPY2Pb jfGoDQoefY+kE/mqd6E6w6fxCKqnhbxtGgjPgR6Ol7qCe2rVG2FBofrG0obt5T/uYIXd 1LOvjuh/7hoZSEsP93OwfJs6YbtzIjstZdOOuwbeaDJIgGWT4xGo8coo06fNY/VzcRZ0 T0PDqLnV+MyEL6wj9KCdw9CjK8KGHnDF6YT238vDahfz8LOmaBWsIZwJi5aygxcD8Y8e +rSapRJz/4oep1M2zNwHP26NucspsPDK3G+fqpKLIYBrvpsgMFOlSVuPk4HiDaO08gB2 yE5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=9+XszOI1hCvfzBca4ZixPF4/6s3x9OUPa6ndCb1hn0g=; b=FWBimKDt9OASDM5h5d/urAyeTFn6do+IdjTf3SukiB5DoAMa9rNXQsW3ZpcN0sY+br oqnhXfTmdyGJt7HQpjXWA5yl44+9/qjoHcXddZq+b8I9IPwzThUYyKRp7TIHTEPknAEr OMBSeqHe4unwhFR/46j9ORXVGt0S6qfTL8WhcZk5NxgnHVLaqDnGn6dOJVKYkJ3KP2Ur 4swlA/VIjD/QRxNNxBHYIkr5OdUgZaFYHpA2D6wL2KbEhXkOz5omPYUhF83NwAT7BTJE x+kRvp+T0i1jDin42u/yGLrGk8MC1oDSDm1fsIFp5oPJALrfQcjUxl1QZM6pgWHy5ZxS afVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v24si19595996pgn.306.2019.03.01.00.58.28; Fri, 01 Mar 2019 00:58:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387655AbfCAI5o (ORCPT + 99 others); Fri, 1 Mar 2019 03:57:44 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:64990 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733163AbfCAI5o (ORCPT ); Fri, 1 Mar 2019 03:57:44 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id C29D6D8B7D8DE248F00F; Fri, 1 Mar 2019 16:57:41 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id x218vUSR087466; Fri, 1 Mar 2019 16:57:30 +0800 (GMT-8) (envelope-from wen.yang99@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019030116580955-2499096 ; Fri, 1 Mar 2019 16:58:09 +0800 From: Wen Yang To: liviu.dudau@arm.com Cc: sudeep.holla@arm.com, lorenzo.pieralisi@arm.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kgene@kernel.org, krzk@kernel.org, linux-samsung-soc@vger.kernel.org, michal.simek@xilinx.com, afaerber@suse.de, manivannan.sadhasivam@linaro.org, dinguyen@kernel.org, heiko@sntech.de, linux-rockchip@lists.infradead.org, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, linus.walleij@linaro.org, avifishman70@gmail.com, tmaimon77@gmail.com, venture@google.com, yuenn@google.com, brendanhiggins@google.com, openbmc@lists.ozlabs.org, xuwei5@hisilicon.com, maxime.ripard@bootlin.com, wens@csie.org, catalin.marinas@arm.com, will.deacon@arm.com, horms@verge.net.au, magnus.damm@gmail.com, linux-renesas-soc@vger.kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, fabio.estevam@nxp.com, linux-imx@nxp.com, wang.yi59@zte.com.cn, Wen Yang Subject: [PATCH 15/15] ARM: axxia: fix a leaked reference by addingmissing of_node_put Date: Fri, 1 Mar 2019 16:56:56 +0800 Message-Id: <1551430616-42014-15-git-send-email-wen.yang99@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551430616-42014-1-git-send-email-wen.yang99@zte.com.cn> References: <1551430616-42014-1-git-send-email-wen.yang99@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-03-01 16:58:09, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-03-01 16:57:15, Serialize complete at 2019-03-01 16:57:15 X-MAIL: mse01.zte.com.cn x218vUSR087466 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/arm/mach-axxia/platsmp.c:46:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 40, but without a corresponding object release within this function. ./arch/arm/mach-axxia/platsmp.c:53:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 40, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/mach-axxia/platsmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c index 502e3df..c706a11 100644 --- a/arch/arm/mach-axxia/platsmp.c +++ b/arch/arm/mach-axxia/platsmp.c @@ -42,6 +42,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle) return -ENOENT; syscon = of_iomap(syscon_np, 0); + of_node_put(syscon_np); if (!syscon) return -ENOMEM; -- 2.9.5