Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp309306imb; Fri, 1 Mar 2019 00:58:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzqSzFfwKNFlWcVwmvqHGaxNMwhYfv6UVQa9C2wcoH5ZfbgDCK+VUSR30xocgoeYqwoWEAA X-Received: by 2002:a63:5813:: with SMTP id m19mr3822014pgb.294.1551430735479; Fri, 01 Mar 2019 00:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551430735; cv=none; d=google.com; s=arc-20160816; b=EbWqpSLZBu0SH8SN8oxnii77RB8A0whbzCdxsb8SOQnxfXYEFcMQfh9dBN2BBWhqWo 3xcpREjt4/+q1tzeklc/beetrnyNIKOY33xTNGOtncEWRnjjei7pQWkGVxLug5u9vcAL X00QsUcAGqXzvaWPXVX2chd+jL5EJVwb/bkYEDAPZyI0p1E43oX+qrt+Lm1kDwhKL2wo z0JU28VGoUrFP4ZQ9DufijwFFsFM8wipvEZ9hJ2T1jfE/hkOEjFKQUKg/FPMmUVyvjad RleEpGTtbtHNyZ9FKO75ybIwr4NE/gmEGdvU4wio2UoIyYvUJZncSC2Cd7GEvaA61Rnw bBuA== 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=QdHOpncKtMknhr5DwLvyMX4PLMdiufMPggr2RKD3cfw=; b=zSK+3oT+OT8Hgr596N3zRyCdKLlfbaNznOrjdyhnh7lmbGV1uhXMuDEkSfuHwqUJyU EWsmgr7aZDcygsGvz8V04M/miy9STtUZKnWp/Z1ubYp00+pJcImGSS5vzQbRYFCw2vui /ZILCb9Nuu0bTN3dUIq10CuuXF/gUwRaMEGkl7vUajEwd4ikyjj+6RzjTO0yfz8trdB9 CR0FncpoCNojrwN7M7raA81pYJc1yQ7kwc7V1MZ4xUWCo0JXrWDkv0T5GhZ1k6IzvU31 SLB4vlovNag9BlIY9iwa3admP5WfYZ5hEP0jPTkaVaz6JJw4m3m1R+IPd7+CZoD2vvt3 LOWA== 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 p36si16912335pgl.145.2019.03.01.00.58.40; Fri, 01 Mar 2019 00:58:55 -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 S1733260AbfCAI5L (ORCPT + 99 others); Fri, 1 Mar 2019 03:57:11 -0500 Received: from out1.zte.com.cn ([202.103.147.172]:59352 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfCAI5H (ORCPT ); Fri, 1 Mar 2019 03:57:07 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id F2CE5393152F0DEE746D; Fri, 1 Mar 2019 16:56:58 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id x218uqOa086450; Fri, 1 Mar 2019 16:56:52 +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 2019030116573096-2498916 ; Fri, 1 Mar 2019 16:57:30 +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 02/15] ARM: bcm: fix a leaked reference by addingmissing of_node_put Date: Fri, 1 Mar 2019 16:56:43 +0800 Message-Id: <1551430616-42014-2-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:57:31, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-03-01 16:56:36, Serialize complete at 2019-03-01 16:56:36 X-MAIL: mse01.zte.com.cn x218uqOa086450 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-bcm/board_bcm281xx.c:43:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 35, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/mach-bcm/board_bcm281xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c index b81bb38..1238ac8 100644 --- a/arch/arm/mach-bcm/board_bcm281xx.c +++ b/arch/arm/mach-bcm/board_bcm281xx.c @@ -38,6 +38,7 @@ static void bcm281xx_restart(enum reboot_mode mode, const char *cmd) return; } base = of_iomap(np_wdog, 0); + of_node_put(np_wdog); if (!base) { pr_emerg("Couldn't map brcm,kona-wdt\n"); return; -- 2.9.5