Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3788435ybi; Mon, 29 Jul 2019 12:38:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzn1LHw2oCdzZ8L6FEqLwuPOe5gJbRN05LnzP7ZSKmvCBRex8yYVCpJaK7RXfXTCAF+FUnc X-Received: by 2002:a17:902:9307:: with SMTP id bc7mr108095655plb.183.1564429097803; Mon, 29 Jul 2019 12:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429097; cv=none; d=google.com; s=arc-20160816; b=S0BS3xFRqUYNJfl+KL7YTq5Uh7ZOywC+rZNRcW1i/+yAK0i5q5nAAkBTY0d9kBohZg GtGE0FuLypPBWrfcFX28/0VvGsBzE8dY8Vl5UyCebKK/L6w6zvfCesHWTZn2AyxyRcGq 8lrbZhUHRDPcGqzpS0o721RwzsevzeRygzeq/09dWLXY50cBl66EDpi3UCWxRGTrBZFn 16x9RlXekv3AHdpamK1tV1Cc6/assvxJdTXxONlliYdegHyO86E5AUdAYSvdX5glBntM GlnnebT8TkTlKUZ27oUyZdc13IKsgJf6fUTrFQLixvc3acZSwLabrOGNZRY1otUFoJkV 9xQA== 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=z/sN10LVHpEkry2MlC3/YUO0xXQxjKpYnVOz5Qf9GJk=; b=JJ3Cz4a2E8Y6tCqYtpEwf1Ut0opu3+Jtj/oUsA1J1I1Eduv5sGYytvQFTJBVw70ZvP cy9FZIrVjzYdVjx5CI1GevFOOEMRufrJZXfXTDH112HZE2HM8ta3Qk9ZRhwhdPUVtrUf 5uhXCT1wHphSna4Mf2Yx9tkUarRkKr0GfLuNLht0dXcYdcUiY++nXDE7eHFqSUy/xuFr 7eN/DnYY1HAlJ2JuYzd48buatXZV7zC1G33VunlJsSlvJOBpvGCrUWWM1CfpSUnUYYiY K5myqwvf3wVZIeradAYpBNxtuV7OFTbGiV0UnGCBBvLjUUkQLg3RiBpZDR81ZyEWDAcy +zfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tdlKejRG; 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 bi3si23731262plb.226.2019.07.29.12.38.02; Mon, 29 Jul 2019 12:38:17 -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=tdlKejRG; 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 S1729577AbfG2TfV (ORCPT + 99 others); Mon, 29 Jul 2019 15:35:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728886AbfG2TfT (ORCPT ); Mon, 29 Jul 2019 15:35:19 -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 A87912070B; Mon, 29 Jul 2019 19:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428918; bh=XYN/qrYwQHRKz9KRB1CiZLD9OaTPu1tl4KBb3q3d40o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tdlKejRGSSA7euO2+D348JQukrnModNHb19+F8NDdGJGOLHrxkjHJZS+RqAdj7+X7 aHVcNiR2HUP67yXxywl4BY1Zkfh20faf5MZMDYp7QsXmfWkzp0eOBkcoJwyi/T4RKx YwTJbQndqX7hDNy0x2XDqvbYjk+ss98a4D/+i1QY= 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.14 225/293] pinctrl: rockchip: fix leaked of_node references Date: Mon, 29 Jul 2019 21:21:56 +0200 Message-Id: <20190729190841.727001383@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 a9bc1e01f982..5d6cf024ee9c 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -2941,6 +2941,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