Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp105935pxb; Tue, 14 Sep 2021 20:09:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmf9gBjL2lEKAoKdwRb0Tb5GjuYV4F47KmiNo4ryKDXWOiLIe7TS2eTG6BorO3iG7I/xXT X-Received: by 2002:ac2:5d2d:: with SMTP id i13mr15653317lfb.12.1631675357082; Tue, 14 Sep 2021 20:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631675357; cv=none; d=google.com; s=arc-20160816; b=rJFH2aukY7Khc+LrqXBq/1LOF2Sg591ZWQBQnQE8vguENdlK4czWbtSLjqYu0znQRf hExmi9OTWDDYcFMmgqPSmy/+yRiJ7rWn41qCpSk35Hva0GoKPQTc57pgo6CGqyN9+4aj SNfIlgAvokmW8C17QouDdsATFC/LnWCuRED003wIBqQSmjgtSxm56cuJD/lNXHKtPMOG 7SBtF7YYYvT09okjIr1Y8mGtHyVMp0d5NIj7a/SxevvTOy9n5ICcHmZs9ZZAOYA7Vt5s HGsbo5EQKImFsK64ObB6PZ14sBI4kH8pA02yUOiVuEHjxUtiz7L8IYbVji0QS5TvmPNB Bgkw== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=SbnH70NaHxRV1d59cQIr2CcSI16zTklSHTeXNxt3cIg=; b=ZVi93B9YFCsMwOHGBL5V8Wbpnoi1E0rqZOGH3B/JxCeK6wIcT9XRvFLyLIcBRFch0m 3WPbiEvhCU/Xs04UYJN/AlV/AMb+kpC3oYnbQnYCmSUtQJTYhPPx4TGMgeM9AuwbKcoD 8SFswyrQ1NEHSmWZ+zJsqG4DCvcy+GtZJPOviNUj7BJiVs+81Vrwv45yFf5n4wxpHfnf 3KYzcE4m/ZzhufhepbevUptOpg9cUxXZSt5ppf27Aog+02gMYXTooo3zLlnKdk0oa1tt TzWcFnHcXxMfT5dBVvqyE4+BK9mJiEVisASXWenVDgBZPAvgeluMpER2N8/L1XeFNXjm VtUA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si18322815ljj.7.2021.09.14.20.08.49; Tue, 14 Sep 2021 20:09:17 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229852AbhIODI1 (ORCPT + 99 others); Tue, 14 Sep 2021 23:08:27 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:33224 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229758AbhIODI0 (ORCPT ); Tue, 14 Sep 2021 23:08:26 -0400 X-UUID: b270f9c4b47d466ab45eaf3a6575f242-20210915 X-UUID: b270f9c4b47d466ab45eaf3a6575f242-20210915 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 578152907; Wed, 15 Sep 2021 11:07:04 +0800 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 15 Sep 2021 11:07:02 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 15 Sep 2021 11:07:02 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 15 Sep 2021 11:07:02 +0800 Message-ID: <7a1af556bf3b7dda9f1be848d2631448a1155ec6.camel@mediatek.com> Subject: Re: [PATCH -next] ASoC: mediatek: mt8195: Add missing of_node_put() From: Trevor Wu To: Bixuan Cui , , , CC: , , , , , Date: Wed, 15 Sep 2021 11:07:02 +0800 In-Reply-To: <20210911081246.33867-1-cuibixuan@huawei.com> References: <20210911081246.33867-1-cuibixuan@huawei.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bixuan, Thanks for catching that. I found there are other usages of of_parse_phandle() in the file. Will you handle them together? If not, I will prepare a patch to fix them after this patch is merged. Thanks, Trevor On Sat, 2021-09-11 at 16:12 +0800, Bixuan Cui wrote: > The platform_node is returned by of_parse_phandle() should have > of_node_put() before return. > > Reported-by: Hulk Robot > Signed-off-by: Bixuan Cui > --- > sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c > b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c > index c97ace7387b4..8cd8450409e8 100644 > --- a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c > +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c > @@ -1041,8 +1041,10 @@ static int > mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev) > } > > priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); > - if (!priv) > + if (!priv) { > + of_node_put(platform_node); > return -ENOMEM; > + } > > snd_soc_card_set_drvdata(card, priv); > > @@ -1050,6 +1052,8 @@ static int > mt8195_mt6359_rt1019_rt5682_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; > } >