Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3724723pxb; Mon, 24 Jan 2022 16:23:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfA7P9LrtrUvolMStx0PAV6RyLS8koD/mbufcV7D8rIcfnpr4bclAELno/cl0lMSj+qp2e X-Received: by 2002:a17:903:4101:b0:14a:f175:edc7 with SMTP id r1-20020a170903410100b0014af175edc7mr16719282pld.50.1643070235106; Mon, 24 Jan 2022 16:23:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070235; cv=none; d=google.com; s=arc-20160816; b=UFeHIDhb2hU/AeCyQNffZoA+hj6yyXJVXb10W48LEIJt810xdEaypM3+2ekIv1qqGC zUQ9Rz5MTya9Y2XgIziS8Dx5zHQoI/gn1LP/6MNdG8O9E5dn7iIoXudT5n+lkjGlufeL UdeUr/39vH5vM2iMVA4BYUT3b5hQAQsuWYn/6MxYmDSr31ctz7/rlN1Yey8SVY0Qy5dg +liZHKB8SLGivOxRcxK7af+h1bw/njymzKfg0Od+vFWbIajGQILO2kQkFcE8CoJA8wP6 mC9W58fakSchIdWgsleLWk+i+azxo5+f6oHKLPRfVR6MtcAO0vx/1XJ/6e/ovwbAMWsW b1KQ== 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=ALqX+37duMxeg44pLgi9jmsZk6g/0dKGFyRQmOzYteA=; b=JkOUzrSTcQD5YwhMEcOPgz/fwZwmudvt9eMPTqiRTwK7cSfAPgZZfIS5w3/Hn8/r4Y 1joAe8uZZDeK9sRsyfaArAVKWAL7NXelF3NyKK3NHi2eWmKJZyGtnxDDhHJ6wADWtGX0 5XafqmkpEyo5dhV9CP0D08Lh+nJG56BfwQWzi2uk6Jeg8PE8QKfj+AZIPs/lJDhztXVy 8U8hAO9AarcPWOvgfhLkbwVSyi7DzNfuFbdoLl2Dfn1ISINdu/0OX/ubfAi6KQSkX9rK L/vwpt7hUZlBgf5Eq6z6dwPcnENTmw+tv7Zjg1smHoqT/WcFCSW6xU3G9y7iKCOwg0jk 7m+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WDqjz8PB; 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 j9si15745889plx.86.2022.01.24.16.23.42; Mon, 24 Jan 2022 16:23:55 -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=WDqjz8PB; 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 S2374004AbiAYAPv (ORCPT + 99 others); Mon, 24 Jan 2022 19:15:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383884AbiAXX2E (ORCPT ); Mon, 24 Jan 2022 18:28:04 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E8B2C01D7F8; Mon, 24 Jan 2022 13:31:42 -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 ams.source.kernel.org (Postfix) with ESMTPS id 454EDB81243; Mon, 24 Jan 2022 21:31:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6572EC340E4; Mon, 24 Jan 2022 21:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059901; bh=vqm+l+et8fHmf+ZDrFYxAyjLbW9sX4AdX0B4LSjo1aY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WDqjz8PBkgRwG5qIHpG+2ahaUFKj7uLUHgfbppe02BElOKgcC5EJwPnxxkkiaMYL7 7ReP34JqmyAWOPA8jAcjFDmxLkYw0MKdWoVF5HGSNG+uaXnPeYUKy0jk5zRTq6QFvF D/Pl4tjq387Nr25zia2GS60O1jRwDySyiKZdawJc= 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 0773/1039] ASoC: mediatek: mt8192-mt6359: fix device_node leak Date: Mon, 24 Jan 2022 19:42:42 +0100 Message-Id: <20220124184151.286262603@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 4e28491a7a198c668437f2be8a91a76aa52f20eb ] The of_parse_phandle() document: >>> Use of_node_put() on it when done. The driver didn't call of_node_put(). Fixes the leak. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20211214040028.2992627-1-tzungbi@google.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index a606133951b70..24a5d0adec1ba 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -1172,7 +1172,11 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev) return ret; } - return devm_snd_soc_register_card(&pdev->dev, card); + ret = devm_snd_soc_register_card(&pdev->dev, card); + + of_node_put(platform_node); + of_node_put(hdmi_codec); + return ret; } #ifdef CONFIG_OF -- 2.34.1