Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3583651pxb; Mon, 24 Jan 2022 12:49:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuKTMj4749ftaZfiQFzHrjDui9zItJSdXSpw9tqG9Q0LTT9stROAZ87IE8u5SLMIqe6y5l X-Received: by 2002:a63:cc48:: with SMTP id q8mr12649910pgi.474.1643057342493; Mon, 24 Jan 2022 12:49:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643057342; cv=none; d=google.com; s=arc-20160816; b=0E4pBphvVsco3WduCBhWRqr5xPrJOcyr7vAklhyEi+7GRJDeYhbg18XI8j0a8+0jrf DcPKthVROa6KwBHdEz7Nn6ZZ9d5pSOVq29NMqF1LRfhrYq0olHtxDqezVx3AyKdQw/Uo Mi7NyyGV3fsLMqRlBLjvHO4t3SI4l6IwyrSPqN3FZ0dHFuxoewRm53mSfz6JLQbGsz4Q aFbz7s1L/ckJqQZTAD+fwCiQriipr2YLiTEuxRKNLnMuxmnVPS9B7FcIuZJNq0iMm8qv E2yQLIHaCuPP03PARa+6pVze8DJadaPVMXippf3N8akju0chWEeamHlDHvpW4S1UHReI WDXw== 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=gzi/JEqGPu15JspUB2+iv+EmU4hgDh4wRIKhnchXkaM=; b=TTCuurjKKd0ua3Wi2CHsNjfuMm6yF06O93R5sEjkME/GQuHu/6GGbxsBcSD2iVSuKF 6p5uEYd8N3VyK7PbIiHzzLDM0Nu0lfACFKMAnupV249ZWmExXr/tZMtmJxOiu1gbwImN 0Jx3z+76yivQnuc+gzJG913zzJWQQlxflqtkX6y4rlToNzifHJWKT6It+qmCu1ptZbNY mDVwO6MQ0EQo9JDc1smrx8KMYK86GaWUmbKsOKZc8hbweNx3wQhMICygAGM2LpK6aVJY usRXGBNzGqWNMlZBY08Ee0mzVffi1WuXvdVsSa/OggIxayPqMKX3+qK14u6r2xsEmxdz IsMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=v15+YIbg; 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 y28si14087737pgl.759.2022.01.24.12.48.40; Mon, 24 Jan 2022 12:49:02 -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=v15+YIbg; 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 S1376930AbiAXUEi (ORCPT + 99 others); Mon, 24 Jan 2022 15:04:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350388AbiAXTYy (ORCPT ); Mon, 24 Jan 2022 14:24:54 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECD97C0619C6; Mon, 24 Jan 2022 11:11:29 -0800 (PST) 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 7F8A4612B1; Mon, 24 Jan 2022 19:11:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4153BC340E5; Mon, 24 Jan 2022 19:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051489; bh=gIKHEDVhwjYvzr6NVj9ZyKBbjZEWfl2bTvGRn2pl4tg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v15+YIbgo8rpGqe2xcDJRxKVibf9XAjHxyUdCoLTzp7eeenfBkA+sxVuoisReNbrm fNIrA6WeERxQFsW0dAjodL2C6QraJNG1DbgepknbBKTxxm1up9e318OmukfBm0FR3H ePmd7fnN/4/Dd6AtiSIh43gfTbkRHllHHqyo/cq0= 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 4.14 146/186] ASoC: mediatek: mt8173: fix device_node leak Date: Mon, 24 Jan 2022 19:43:41 +0100 Message-Id: <20220124183941.801733744@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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 e0c2b23ec7118..0adb7ded61e9c 100644 --- a/sound/soc/mediatek/mt8173/mt8173-max98090.c +++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c @@ -177,6 +177,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 99c15219dbc81..aa52e2f81760a 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -227,6 +227,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 42de84ca8c844..61b0d8f8678e9 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c @@ -284,6 +284,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 e69c141d8ed4c..3492c02f72c1a 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -316,6 +316,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