Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp164282pxb; Sat, 11 Sep 2021 01:20:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGXPu8tVn8XDYMI0ftO/qqQIWFKDbDsIIVqxb4LQRE7M3riMhfmc2o+N7UZUhLONJJ9cL/ X-Received: by 2002:a05:6e02:184a:: with SMTP id b10mr1229735ilv.90.1631348431634; Sat, 11 Sep 2021 01:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631348431; cv=none; d=google.com; s=arc-20160816; b=ujaeHAaOWMEoyNYQO1MrN5KRMGVGtnLJlfF0CucyTU902Y9D2SmuCzsZee9pypGCDt Et77AIcyl4wpOrbtjx0e1gbxTor9Ph2NqwIS7zv5Y/T43qsy0d8nKE9Bl1BFcLBgbpfH lM6Tcb5XWpsORaos/W5a2G6DYQ0dJWQQ6DuTq5uAWPlnzrFI1w5oBT+RmxvBok7o+KSr 4UgM4KcAzqAdRfPn0CfsopnIgQ8ZZDtOEw4ADhvfspCmvWB1Mt/TsUrWhYrLcbAPmbd0 huH7H4RZCCAbU0yJDYI8ZsPk2Z1X6BuK0udfN1D5LM6mNwB1mqAiShchebRP1WzIEOt3 FD7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=qkhfHsaJDIf5nHM6mZV5Gn+wOTvUkiWwVgGhkusEK4s=; b=c2AsD6IKMv60XarHw9wkoqG5fxbFUX3zML+LPPWmeFiCW34m+FYpRIR3822knroX+3 zqT1QbXmTsTUEmNGbQh9JTidTxl5pLJHK+nFEJR1fg4aVbKIeUe5z3q4sCsqyBbKFsak kTMJeqbMy8dFpfH0+zkAukUDtg4wBgnSL1Q4F52ja/+c4jzbmTNgUVnyd7bgMVDX1yEs LMppIRy/JEn3zDXhgTEz778GfBf9fXJu8KUVPkAIuAP+Wvi7erzs4Ln7099McafHkHh3 Kt5X10hSErKycIZQIFo9xee2TLlxACOdZ6c0iH1Y/65JYz78raU0lq9od3DWeZsCd0PN +bUA== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si904062ilc.75.2021.09.11.01.19.51; Sat, 11 Sep 2021 01:20:31 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235407AbhIKIR5 (ORCPT + 99 others); Sat, 11 Sep 2021 04:17:57 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:9418 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235334AbhIKIR5 (ORCPT ); Sat, 11 Sep 2021 04:17:57 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4H657l2fDqz8yFx; Sat, 11 Sep 2021 16:12:19 +0800 (CST) Received: from dggpemm500004.china.huawei.com (7.185.36.219) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Sat, 11 Sep 2021 16:16:42 +0800 Received: from huawei.com (10.174.28.241) by dggpemm500004.china.huawei.com (7.185.36.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Sat, 11 Sep 2021 16:16:41 +0800 From: Bixuan Cui To: , , CC: , , , , , , Subject: [PATCH -next] ASoC: mediatek: mt8195: Add missing of_node_put() Date: Sat, 11 Sep 2021 16:12:46 +0800 Message-ID: <20210911081246.33867-1-cuibixuan@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.28.241] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500004.china.huawei.com (7.185.36.219) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.17.1