Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1191466ybi; Fri, 2 Aug 2019 10:51:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjqBYzRppRq268hDfwb+jwoIgRe8JDDDkyIPl1cp8GC32iIDBcm6309EbVc35nMJkm7h/j X-Received: by 2002:a17:90b:8cd:: with SMTP id ds13mr5136149pjb.141.1564768284286; Fri, 02 Aug 2019 10:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564768284; cv=none; d=google.com; s=arc-20160816; b=AZ+H/rNFrWMDt6uIzkKRoFPuDMhSFSOKbqk88yHBvqLu2QKn6dZzuQBzpbrmhDC9xj uH8FZXViCK3a7dhdhgBqFm5g5y86EV12hOyCOef2TaYrw627rjublKxiknmErYGyuY8w CfIAxjQvocY0GfJOOTEnG+f+aEbGJVckj0wRBUphnK0OFZhZMqOENq731GVNmncBfx07 P37NSlvlyYg29pyWv+fOCREUSkpBRXxElc9ZXR5hjoBgh8te9PWCythAuvFhU6wlwcOQ PtdG28NEpQ6nU1lFbsu5+DJaRlcv0PZNrjl8j/WJwXZHdFR7RbeuYGTUoqHaJTT2arBK qXaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SkJ9LMSewLE05Mpg7OpfBeAUU2pNv2C+1qW3zOFCDwc=; b=ECfL3tFwdQxGxsHc6aW4DNlFFIrUZq59Y6CS+m5Hwj75/zUDovbWlEs8LGX00xwWJj ivo34hErYQmHQ3+hYB+FUOpjT6RQaCpAhhdqfgvJjAYd6Ji/hMbSgmOJkPvaUKi4xp4S h4N+2kruZvK8WfLRM6Vgc3lUEi8gkttx8dsI2IFyj/4qURjVsJBM3IiYKRPeuQTsVTkH aBp466eBEyaTIe3pMwsvZypiT8k2n9YcmC1SrbzCx8Mp2qLH52ikautrn3iJTjBfsBQc ovgeb3/QLiLL6sJBdqn5ULKhEctCNSTvhancnN9/p+EOrjFqGae4fAGbpw64gDgTbRVc w5Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="N+F5/N2x"; 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 v13si7769795pgr.103.2019.08.02.10.51.09; Fri, 02 Aug 2019 10:51:24 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="N+F5/N2x"; 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 S2405894AbfHBJvj (ORCPT + 99 others); Fri, 2 Aug 2019 05:51:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:56854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405876AbfHBJvg (ORCPT ); Fri, 2 Aug 2019 05:51:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD8872064A; Fri, 2 Aug 2019 09:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564739495; bh=goHfdpkyjRkUxgqH3PRtuRUvEVTPWNxCNirmAlAXiTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N+F5/N2xS17DE2+KW71cST1dRyNTwfdPsA/svXoYfIznhTmRFB3ox5P6YxhUua6P2 8YcpTcrWamBuODt3HZlpJuS9lKDRmERuI55lPmMhgh1myF0S1G+P481LBbw0UCv8Zq S6w7SDfrUOxYHiii8kawOuLaHycytO8lsdsN9iSc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wen Yang , Linus Walleij , Heiko Stuebner , linux-gpio@vger.kernel.org, linux-rockchip@lists.infradead.org, Sasha Levin Subject: [PATCH 4.9 162/223] pinctrl: rockchip: fix leaked of_node references Date: Fri, 2 Aug 2019 11:36:27 +0200 Message-Id: <20190802092248.664754116@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 3c89c70634bb0b6f48512de873e7a45c7e1fbaa5 ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/pinctrl/pinctrl-rockchip.c:3221:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3196, but without a corresponding object release within this function. ./drivers/pinctrl/pinctrl-rockchip.c:3223:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3196, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Linus Walleij Cc: Heiko Stuebner Cc: linux-gpio@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index f826793e972c..417cd3bd7e0c 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -2208,6 +2208,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank, base, &rockchip_regmap_config); } + of_node_put(node); } bank->irq = irq_of_parse_and_map(bank->of_node, 0); -- 2.20.1