Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp443194pxj; Thu, 17 Jun 2021 06:23:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhT1B1Q6lN+bxu3Uz6i5Z3D9go4S51/Mh5WVQvyj7VHu1IcrE+en6/1KKoY9hBVoCCFSQw X-Received: by 2002:a05:6602:722:: with SMTP id g2mr3813045iox.118.1623936185162; Thu, 17 Jun 2021 06:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623936185; cv=none; d=google.com; s=arc-20160816; b=v9qcHKl4MT/5hW7TfSZ+4/Q+t0hgeP8FPlDQUO3tWozaEgi1lV5nuDuovJslHo5K3q L8PL5eYZOH4Z3jJbbct5hKr7dqGHrSHHIkaPdl0LDgx8ATLFju1lzayrL31qJVJBsfR5 qopaPboAsmg7e0JtbBi92FRQIx0WopDGXIAHeMTz6TurHVT82BdtctpDWf5x4EaNDuvs kI48tcO6CefWfMXcbEBEoodN9hMwKKNxDOjF9XQIUvuJx6gCI/6+r15QDSiLosQ85VRs mwgICljNbKnNX9Ad9//PATni1bd8wttAkEEQ4dOhxz1OTpjwtPYcFrbsAfzvwYzXLxp7 iEAw== 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=bXbdNPfdxYYtZJEJyJKD5ztNROrnZjsM7vi+R8Ft5Lk=; b=iS9OIGUFeYUrawNIpk6l0VeQlPL9QNTKiYmy18a6Yt4yaNMM+mizQOz66jMvwNwxJh DBSckMrAEUQMclUVmBhjaW8U3WyzB5P6enSVoi1KM2WTekdClScyXjXXDsNOktfAyyye BiQV/a6EAjRIY4YvsMcAjLS373IgVgAPu8gwwUI7ANYekw3z2xq23r/+ilgVJwz78RLl FGcrkflS8g/s8NJm+iLjvsLxc6Y2B0pXEMQQOYEEWv5wGXAkZEII2gvSP7J552DdRGzA AKlYsYdh7xvMjZ6KuXP4nbfwRDVkg9tfFAYedYKTF6dUYzCOsakc8ghVZRlEd5RmWVWU UtMA== 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 a14si7831663ilm.103.2021.06.17.06.22.52; Thu, 17 Jun 2021 06:23:05 -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 S232411AbhFQLOh (ORCPT + 99 others); Thu, 17 Jun 2021 07:14:37 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:7469 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232403AbhFQLO1 (ORCPT ); Thu, 17 Jun 2021 07:14:27 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G5K7k0kwRzZhsf; Thu, 17 Jun 2021 19:09:22 +0800 (CST) Received: from dggemi762-chm.china.huawei.com (10.1.198.148) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Thu, 17 Jun 2021 19:12:18 +0800 Received: from linux-lmwb.huawei.com (10.175.103.112) by dggemi762-chm.china.huawei.com (10.1.198.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 17 Jun 2021 19:12:17 +0800 From: Zou Wei To: , , , , , CC: , , , Zou Wei Subject: [PATCH -next] ASoC: tegra: Add missing of_node_put() in tegra_machine_parse_phandle() Date: Thu, 17 Jun 2021 19:30:47 +0800 Message-ID: <1623929447-4335-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi762-chm.china.huawei.com (10.1.198.148) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function is missing a of_node_put on node, fix this by adding the call before returning. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- sound/soc/tegra/tegra_asoc_machine.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 397f326..cba55ca 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -336,9 +336,12 @@ tegra_machine_parse_phandle(struct device *dev, const char *name) } err = devm_add_action_or_reset(dev, tegra_machine_node_release, np); - if (err) + if (err) { + of_node_put(np); return ERR_PTR(err); + } + of_node_put(np); return np; } -- 2.6.2