Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3576863pxb; Mon, 24 Jan 2022 12:38:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRg4ELnhc270ATQxii42BPcoe5iGQG6y1BY6FgRLBktYvT5qwFstSk2Tj+UFn7glf6I1nG X-Received: by 2002:a17:90a:ec02:: with SMTP id l2mr80672pjy.61.1643056693987; Mon, 24 Jan 2022 12:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056693; cv=none; d=google.com; s=arc-20160816; b=qMsV45INc4P4FZ1VuM9UttKmygoHxwRH6UBtXksqofcbKeSKR2iw98kUc36kOe5Pq9 CxvihE8yuf5KM2WxPW9IGNr2MMYvwdmR5idinl3TMVJPPtfi55NNFkOrqsfJ0k+3fZmX FlM42iiLhfZYa1+R8gDF9Tx3T/03bOfHFy3ketr94YpC0k+UxIULTuao8HV+tdz31z5S Ml/zZEfXvT5KK+ScahMDmjVabwCIPl005nK86UQA5YqtA0Iy+RclUzhMlos154SHQT9I P/ZUB0ZEz0u+jp3YDCDavI0qM2cGkfDmWG5dPL9Ig2mUcPZZTFOPC0PfY/nN1rkhIhdq Sw5Q== 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=/s72PALgCp8KNfF2Y2Zeh0tzP54S0ssqW6pEHIbS2dg=; b=oFew2C1OE8vWQ3zHhj8gx8zDLKXhIPyY3959sUBTf4rD6lpQ+M5gdU9xYn0SbrEYjA OcAbi7R7Q1J9ihM8tLr4zjwHlgph0Zn+D2mZTsF0heNpHUAgJoQzgR4GsUYLUgpwq2nG PB9CoCEWvHlHw/zdi7xZbaHMyIEXwCzafxBGmZ/EFJ9O4mIvpCD7g4Gz54IR+i8UPF0S PrwW7ARcCtEIXpn+5BAxD5o8FA0Gim1wuDds9HsHX65GVlt7iYrgQkngzZB4YNxu9PIu VTD7Rwqhzo/EQqs7xv6HWZBm+b/MTPPPvwWEmSLrtbN6oqcN8lA5PdB08sEi98B12hNe 1/zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H1W8TrEx; 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 w76si11682141pff.130.2022.01.24.12.38.02; Mon, 24 Jan 2022 12:38:13 -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=H1W8TrEx; 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 S1349673AbiAXTss (ORCPT + 99 others); Mon, 24 Jan 2022 14:48:48 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:59342 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348676AbiAXTiU (ORCPT ); Mon, 24 Jan 2022 14:38:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id 28A60B810AF; Mon, 24 Jan 2022 19:38:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FCBEC340E5; Mon, 24 Jan 2022 19:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643053096; bh=IsB6GP+yJnWzUkvkzrdDk9FmxGEtrdhq6Spim46u5qY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H1W8TrEx1SAI7kSJTQmqbYDqAkDRNNpGW0WHf/HcqzcUspol/iXUF+jhruR68ZAgq wiPb7xMvKyotpMJqxy4ZgHIhg+MeQOcDXXZO19o02NmQVNlyVUI+soceDp2IHTQsbS FC/tmiTsWd8kKguHN9layYWUmSCMvut4FFdLjl/I= 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.4 243/320] ASoC: mediatek: mt8173: fix device_node leak Date: Mon, 24 Jan 2022 19:43:47 +0100 Message-Id: <20220124184002.252762017@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@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 22c00600c999f..de1410c2c446f 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 8717e87bfe264..6f8542329bab9 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 9d4dd97211548..727ff0f7f20b1 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 ef6f236752867..21e7d4d3ded5a 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -309,6 +309,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