Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp172939ybp; Thu, 3 Oct 2019 11:50:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqypZ0QWneEzvpLe3MySjKBaHRheV09j/xwRUP7/t5xnm9r6gRGhU+ofLX9g7cRytCCjxZGJ X-Received: by 2002:a17:906:d0d2:: with SMTP id bq18mr8996651ejb.233.1570128621138; Thu, 03 Oct 2019 11:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570128621; cv=none; d=google.com; s=arc-20160816; b=cLix1UXRjCO0EmPLtN6M5HCWCWWRaq2fP1XszuRK/PgHk2j7RkWYy3oyTjgA/CcMl3 4qGzittjQqDFRzSSuCSdyLGrHwRRQGVd6LMPALRto6FXwGXZYYWBjTYjSWwVUqOSjrf+ riEdKhycoB/LJbHIg2wes+h2x3r5plS5blf0NZoouRHy5uzuagbBranYBUFEF2AXGr0T EIQxZKIsLmUyDdGNE5x6M6m7JAjzjsYSCKhUvObIZypHEx9/ni/JtdawWSkJF38TrUSv ejSf7Gu6vNeorCH8MotjgNGo0I3qSrB9H9o0y67I8jE9jvaHpU7y9v7IPw/26IIilO98 T3qw== 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=G5eYID4qxo8A+84Vjw5VmfeZdefDKEFMKHQB0dMcwPE=; b=HPa3ci8jpcIqp9m8dtf0KLOI/PMuqB0pg9NbzNk07sCfoq3WUQ/imEv296U5G0ix87 IVGDBmWnkaarREC0ZsLno73jsUg+9LS8xPcf3EBUOtfuL0cz91Dg39dAIpyKq3vqjWrO Q8pWY0JuoSbjbHnx6A/855iE1bOeXCveQcozzIREQdD3prnvzVBkPY82d0Qd5oE63zfj PINTXVq1RZDslTrq/OJ0tl9josges4yrbsGxyCkln7Hwnk7FrmmLA0S6e3MaANOFRIaa tiNT2yoBeoyLP3zZ5s6dyaXAIVxprgPHnaunShRyL7zMr2EQspBYn0ifPOI5uhF9xvAQ KFng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X9rZrpmc; 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 j11si2107308edj.43.2019.10.03.11.49.56; Thu, 03 Oct 2019 11:50:21 -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=X9rZrpmc; 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 S1731013AbfJCP5p (ORCPT + 99 others); Thu, 3 Oct 2019 11:57:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:40236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731004AbfJCP5l (ORCPT ); Thu, 3 Oct 2019 11:57:41 -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 CB3F720700; Thu, 3 Oct 2019 15:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118260; bh=IcFEqKSzhlE2huX698hch9Qt6fR7Sr3QJnA7k5YfM6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X9rZrpmcB5Klx0KlBXtmwWTUMF39SByFD3o+5rkDtD+Q041Bx5YsDLAS9WoeKRMHi fWC8dY1cwmtd48LMunds/KH5bxf4lTCIrjqiYE3g1k5AAk+0fVYrmfBS5k1A9EOoDd ku9MVSBYJ1aiolWjwzjuaIKgPwuU8zWqg+IPjVIY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Takashi Iwai , Mark Brown Subject: [PATCH 4.4 09/99] ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt() Date: Thu, 3 Oct 2019 17:52:32 +0200 Message-Id: <20191003154257.324014712@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154252.297991283@linuxfoundation.org> References: <20191003154252.297991283@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 From: Takashi Iwai commit 2757970f6d0d0a112247600b23d38c0c728ceeb3 upstream. The node obtained from of_find_node_by_path() has to be unreferenced after the use, but we forgot it for the root node. Fixes: f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support") Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Cc: Fabio Estevam Signed-off-by: Takashi Iwai Acked-by: Nicolin Chen Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/fsl/fsl_ssi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1374,6 +1374,7 @@ static int fsl_ssi_probe(struct platform struct fsl_ssi_private *ssi_private; int ret = 0; struct device_node *np = pdev->dev.of_node; + struct device_node *root; const struct of_device_id *of_id; const char *p, *sprop; const uint32_t *iprop; @@ -1510,7 +1511,9 @@ static int fsl_ssi_probe(struct platform * device tree. We also pass the address of the CPU DAI driver * structure. */ - sprop = of_get_property(of_find_node_by_path("/"), "compatible", NULL); + root = of_find_node_by_path("/"); + sprop = of_get_property(root, "compatible", NULL); + of_node_put(root); /* Sometimes the compatible name has a "fsl," prefix, so we strip it. */ p = strrchr(sprop, ','); if (p)