Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3559166pxb; Mon, 24 Jan 2022 12:12:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNhVwtxQqRlUJ4JuTMD4wWF8p/hpeNDcuKPH8aLP8GelloupkjYA+r89NUFkXLJNYLvzHF X-Received: by 2002:a17:902:e849:b0:14b:38a1:ccfd with SMTP id t9-20020a170902e84900b0014b38a1ccfdmr8940017plg.43.1643055145598; Mon, 24 Jan 2022 12:12:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055145; cv=none; d=google.com; s=arc-20160816; b=SvNJBsaAT5XWqQNYRVQa1LngcUF5b4J1uH6iKNnkr9B6WWYlaGtlchJREGB+xnFzLm F759C0WoSyaDqNSKsaSdY49es4jh4GDcdB6ScwMRIbnsNxb2TWj0k+RGM+gvMel2DwHH qHuEKU/42koCam9ioAcGwS2lHCfREIMTxkbaVZ2cG2sTJghyMZDy/bQHnNfrgnVjtZlJ iH1fl4XSJzP0PSNMQTJpT8Pi3Tz4ZEV2ayMB5O0p5qAVAQoOEFRCvF85RBjYrtB+5GiI rgswFNypVgnlfkGlnjl9tgRtw5sA0809IWyzSbDaDLRpLVtiNdQZzBnAUMGganr6Zqa+ VtRg== 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=FtnX4nbX41zJdIOoNiSKAwUE9wm58TTQokJt078gXV8=; b=t3/KIyDO/Pz4WmoZZcdMEL8//m/nBPu4inL6+uo9u3W3ZvgcoRYWbrKzDKlBY5PXta LS2KTGYcsONvsueY4owFssawl27nKLK1aLlXqRkoSH0hKCMawZurU0FC3QYa4b3Zf43j oCqTqVARKebzJjzYng2zK4AUTnCf97/yA6PHceUprw1SGZaBlKwam3GQ019xwMNgii+P 2qVbU4GoGLZNoae/UFDfxwo54ZsFDRjtej+GsWklKkWv8Y3xO1C+TYB61oRW4Ncsh3Ku Vo2BUi0WOMCvPECY8fwjbGgam3hECUn6V0Y/BeuVY/ZFe/4FrgSbmdkokZ3iwfySvhph Hh8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=shArt8N7; 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 x6si13271266pll.588.2022.01.24.12.12.13; Mon, 24 Jan 2022 12:12:25 -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=shArt8N7; 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 S1344553AbiAXTPf (ORCPT + 99 others); Mon, 24 Jan 2022 14:15:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346735AbiAXTHV (ORCPT ); Mon, 24 Jan 2022 14:07:21 -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 DFBAAC061244; Mon, 24 Jan 2022 11:01:44 -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 7E1D16090C; Mon, 24 Jan 2022 19:01:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43CC1C340E5; Mon, 24 Jan 2022 19:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050903; bh=/hdemuENqnf/jOGaiRcSiGH0J0G5zPzuLXuG/sxnf9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=shArt8N7ASkwTUDC98shOBvd45PoSQeTumiVNM5DROLe7XkCT57UWeSG82VxnvUoj q5TH6MoVDltljyVSyjqfGo3z0pOLHyxZnametZ82+MaH+cc3HU+sBbudl+8NBaU5UM mvuoB3Dz3I6DsuS5g3Nrwj3rH/m5g8PHjdmNjUd0= 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.9 117/157] ASoC: mediatek: mt8173: fix device_node leak Date: Mon, 24 Jan 2022 19:43:27 +0100 Message-Id: <20220124183936.493606975@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183932.787526760@linuxfoundation.org> References: <20220124183932.787526760@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 5524a2c727ec7..cab30cb48366d 100644 --- a/sound/soc/mediatek/mt8173/mt8173-max98090.c +++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c @@ -183,6 +183,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 467f7049a2886..52fdd766ee82c 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -228,6 +228,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 1b8b2a7788450..5d75b04f074fe 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 ba65f4157a7e0..d02a90201b13b 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -317,6 +317,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