Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3813687ybi; Mon, 29 Jul 2019 13:08:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+20MoSqFOWEJ6kYNQzUD6d1I8d1C7uir3qxexCIz3HOx9q+QYFgHqLOMjfwW++k2oXriT X-Received: by 2002:a63:ff03:: with SMTP id k3mr10427466pgi.40.1564430890909; Mon, 29 Jul 2019 13:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430890; cv=none; d=google.com; s=arc-20160816; b=VZZzpYRhqpQdCkyPitsZf40kmmTMNeUD+91VEvN0O23sb6uI36/Eg7UwZTUeaZEDKu /sQJ0mFmdQSDSNNfB1c2ZvhAf46b4NxmJT0fQYh7evB8/r68yw8Ov6Eii40bM/zn+jbN DzsV50Y7kYIH0O9AWVRm3knoutIJK4FtcjB3z4tCZKQrIfB1Leg/TkdOxcx1Ecgdic2s VzKpe9GH0rO+OU5YJwzojbCXeMCmDvUVUwF53RDIsp0IEOoqqefMvYFmNC3WxRhLL1LA RkOaK/dFuXMuru4/EOEy/oF9s3ymNHM7LRMdpvLCqTYJyhn+qHcSM4sYiSV//Gk/ilbJ 7wbg== 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=bpgOBGhtSy7iY7NninMb0UJVGWx2HXy1v5q9BEegxPE=; b=mQdOiDV/bavNNFGc0ABBxTP/NY1qI55rBKvP98j4KJOnGd0/38dH0fU+8LVeN2nlcI IhMoLNK3Qy9urFuH+jT3x2U6sho3wzX6ulsg+LUyaD5vcLDqdG5JRwKOqTvz8+M230K8 i9Zjoe4gOk8cZ9UoN0Ez8mK0Fb7+gJy9BnNSpHLmkNzg0+roFvBZfdhxoJbtkUYbwcAS y2gRD69v3pOBEUxHVocVrhPiUXLLVeBH92kCf/dl6sY+fuQVPMIGIK1l5kgI3WlMRxCq 1xrjNlZ0jrIcaHqmxajPKW1PRItMgN1HzoU0kQ2BazDWTu9sXmyLk06HV9BveY4mZ8WT h+9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v0Ux9lbv; 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 f72si29092379pfa.67.2019.07.29.13.07.55; Mon, 29 Jul 2019 13:08:10 -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=v0Ux9lbv; 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 S1729653AbfG2UGv (ORCPT + 99 others); Mon, 29 Jul 2019 16:06:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:56076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389200AbfG2Tko (ORCPT ); Mon, 29 Jul 2019 15:40:44 -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 3D9B6206DD; Mon, 29 Jul 2019 19:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429243; bh=oYKF6OwrpFzDV1JX4t9Wv8N3vWDT3bA6fw+LG/qla+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v0Ux9lbvc4B3PfqFexYGT83yoT+SreFb+FjezzSZhIVhu4jHi+k2yRxuFaYdv7doJ 0dAQLqSPIrz6XvlhK/29ip5QCCuOfTSpGTsO1VaQyip5dmi30tti1Ov1cdvmQNqFja PNHl/czbD60X76XLbvBNoU2fiBdRpS6C6/3Yxh8k= 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.19 008/113] pinctrl: rockchip: fix leaked of_node references Date: Mon, 29 Jul 2019 21:21:35 +0200 Message-Id: <20190729190657.715591976@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190655.455345569@linuxfoundation.org> References: <20190729190655.455345569@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 f4a61429e06e..8d83817935da 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -3172,6 +3172,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