From patchwork Wed Aug 24 01:32:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 12952794 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19DECC38142 for ; Wed, 24 Aug 2022 01:25:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qulxzqENnyoPqpFwGpRsMjwiEKaT2KF21amIU2qgc6o=; b=Em5882MHmsCcC1 JLC1ffhOMxKS0rTo6CePMcVmNOCbRUmFDydbiuXJlRxzBk3D1o3ITDP0C5F/MOrGsOYsWVlOc5qC5 VsLfDpwTmco7FSlLO2g5V/SSPJec17oRjmV/U7HGl84wBqqJS+0GhWSJMbHtD9YHIInVhJWPANCuW R045HnBcLpgd3JI/ZIculYedrsL4ktp5MF3LENOVdnH2AiNqi2DRBcQ/yS9cxqRK9bAaR/LHNWSpm tEPQYSbzxfrIIODFYXG0CRATRvn0po9rsbR27EqfgYt2Nks6Eiw5VXX/92NmmFsJCc1h92m8aJtTc owt+Tuu0ghgCmNLWDMyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQf8a-009nsT-Oz; Wed, 24 Aug 2022 01:24:56 +0000 Received: from szxga08-in.huawei.com ([45.249.212.255]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQf8R-009nlX-WB for linux-arm-kernel@lists.infradead.org; Wed, 24 Aug 2022 01:24:49 +0000 Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MC7b61TBrz1N7Hq; Wed, 24 Aug 2022 09:21:06 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 24 Aug 2022 09:24:35 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 24 Aug 2022 09:24:35 +0800 From: Yang Yingliang To: , , , CC: , , , Subject: [PATCH -next 2/2] ASoC: SOF: imx8ulp: add missing of_node_put() in imx8ulp_probe() Date: Wed, 24 Aug 2022 09:32:34 +0800 Message-ID: <20220824013234.375738-2-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220824013234.375738-1-yangyingliang@huawei.com> References: <20220824013234.375738-1-yangyingliang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220823_182448_233517_6460F258 X-CRM114-Status: UNSURE ( 7.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org After using 'res_node' returned by of_parse_phandle(), of_node_put() need be called to decrease the refcount. Fixes: fb5319af6ad8 ("ASoC: SOF: imx: Add i.MX8ULP HW support") Signed-off-by: Yang Yingliang --- sound/soc/sof/imx/imx8ulp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sof/imx/imx8ulp.c b/sound/soc/sof/imx/imx8ulp.c index afab7feab5fb..4a562c9856e9 100644 --- a/sound/soc/sof/imx/imx8ulp.c +++ b/sound/soc/sof/imx/imx8ulp.c @@ -234,6 +234,7 @@ static int imx8ulp_probe(struct snd_sof_dev *sdev) } ret = of_address_to_resource(res_node, 0, &res); + of_node_put(res_node); if (ret) { dev_err(&pdev->dev, "failed to get reserved region address\n"); goto exit_pdev_unregister;