Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3653194pxb; Mon, 24 Jan 2022 14:31:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXNbAcgCHW2FVDvZo4X/yDTCM1DQWspmRPLynFKnal/IMvYAF1wT8hjL4gJN4wDZwU1QZl X-Received: by 2002:a63:8448:: with SMTP id k69mr13299439pgd.565.1643063461344; Mon, 24 Jan 2022 14:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063461; cv=none; d=google.com; s=arc-20160816; b=LsKb2rqiZbmhK5Xr95nf495RZv0MNY645/xFqLDs8nm/tc95mPcI09e4lU4MU1+h72 RSuRxOsJR6AGA3FFWeKKWmMVyq3fmGLumE3Nne3BU6jU/V6MCqoFtFA3IgPoJSyjxZns Pr6j/redPEmVWdMGf1zFYbuaI/qDSF2lydm1mcOmkmvtQqqiVF6Up3gog2UjhYuo6Vdh NTnfzGmCw/gmWmEF/DCQOcd20DL2t6FtisEj7zdp2wjKB2Vxt5iZLAR8cv7Y8WIyK0Ux 8lMZMg4D6QjkyLMotg9/LkQuZ7skqOg0YMFvBI4TPMJbsQzTezEukVvr9M91ndtJ5708 Hbag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9lEnhfs9xhtpH300mHVi6Oyjrl89Td8IwE3qeYM7Su0=; b=ITzdHXtjSZ4An1G/QAiAvTO05nQsy2U8YQHfOAllPn3/4z9QNkAWwuqzKAld7SJbYG r7dzoAR91pKS8XEi9xgAp3XXf0B8glZu7uV2tIdVC5+Hpccesw3LKQILWaMT3HxXuMYR gzXHIHOigaQGlOxmTNNq2/ixkgsEhFlmtVckwX+HHNTeGagTTbfuSoC5cKGWutFtGuyO KauKUxB2RHoF5O5sOl+ySPYF/89LOkcPZh7X2Fxjfza4WxOJs0xLf3vrKWhlgbFcCUe/ Mkmn/lyQTm7jBZkTkgLx5gZjBDyy7o4eHdK8Q1F686V/2d0pQcjPfLk+xKb6X9BkNEJB NSDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="YKi91/PB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n37si16626728pgl.324.2022.01.24.14.30.49; Mon, 24 Jan 2022 14:31:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="YKi91/PB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1584214AbiAXWU1 (ORCPT + 99 others); Mon, 24 Jan 2022 17:20:27 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:50676 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1454101AbiAXVbr (ORCPT ); Mon, 24 Jan 2022 16:31:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 52C0E61469; Mon, 24 Jan 2022 21:31:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28907C340E4; Mon, 24 Jan 2022 21:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059906; bh=05g762syOAZvMLDp/pEL5fFOuow6W/nYQmSGkutZrFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YKi91/PBSZYYXjyVX8+kY162qubSpa8Q1ySGQK/H9f942GbGe9OxXiqGPuflVR3uh pXvjjkgzuFb9W1k/h0mIL7neR7I3mmiL8M07X2Qkg/JsS7JZTfsax3vJkEqVo8FMcD EpHiq/soEVJ63vWg3/ia+W+riwSS+UlbRyEWyavE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tzung-Bi Shih , Mark Brown , Sasha Levin Subject: [PATCH 5.16 0775/1039] ASoC: mediatek: mt8173: fix device_node leak Date: Mon, 24 Jan 2022 19:42:44 +0100 Message-Id: <20220124184151.348249076@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tzung-Bi Shih [ Upstream commit 493433785df0075afc0c106ab65f10a605d0b35d ] Fixes the device_node leak. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20211224064719.2031210-2-tzungbi@google.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/mediatek/mt8173/mt8173-max98090.c | 3 +++ sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 ++ sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 ++ sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 ++ 4 files changed, 9 insertions(+) diff --git a/sound/soc/mediatek/mt8173/mt8173-max98090.c b/sound/soc/mediatek/mt8173/mt8173-max98090.c index fc94314bfc02f..3bdd4931316cd 100644 --- a/sound/soc/mediatek/mt8173/mt8173-max98090.c +++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c @@ -180,6 +180,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev) if (ret) dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", __func__, ret); + + of_node_put(codec_node); + of_node_put(platform_node); return ret; } diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c index 0f28dc2217c09..390da5bf727eb 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -218,6 +218,8 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev) if (ret) dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", __func__, ret); + + of_node_put(platform_node); return ret; } diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c index 077c6ee067806..c8e4e85e10575 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c @@ -285,6 +285,8 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev) if (ret) dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", __func__, ret); + + of_node_put(platform_node); return ret; } diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c index 2cbf679f5c74b..d8cf0802813a0 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -323,6 +323,8 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) if (ret) dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", __func__, ret); + + of_node_put(platform_node); return ret; } -- 2.34.1