From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F1B1C433FE for ; Tue, 5 Apr 2022 13:41:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390219AbiDENhj (ORCPT ); Tue, 5 Apr 2022 09:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343973AbiDEJQn (ORCPT ); Tue, 5 Apr 2022 05:16:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0ACD7603; Tue, 5 Apr 2022 02:02:16 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 5BE6061571; Tue, 5 Apr 2022 09:02:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E8B3C385A1; Tue, 5 Apr 2022 09:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149335; bh=PSrBa409QKcUs2W/8ZzSou2iYvI9BebDvX7O4pcvzgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=feLJkBX+TIvRwJGapUKuvEvLE4RCYMM0JtJ/IsBAtxNFaW94ZaEL1BxKpp9tS61Xq 0zhJi3C0fwfjp1LoMbXKqLPkQf1392dVqGo/3AIHn7shTVdJeHEwLcQcU6UM1/eu2f HCWRm4wU+o/FTSjhFdaGpu5FneSa4RGxA850nNPM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.16 0680/1017] remoteproc: qcom: Fix missing of_node_put in adsp_alloc_memory_region Date: Tue, 5 Apr 2022 09:26:33 +0200 Message-Id: <20220405070414.462789503@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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: Miaoqian Lin [ Upstream commit 505b5b1616e200042999de715dbe7c1e2735cd65 ] The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. Fixes: dc160e449122 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver") Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220308031219.4718-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/remoteproc/qcom_q6v5_adsp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index 098362e6e233..7c02bc132247 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -408,6 +408,7 @@ static int adsp_alloc_memory_region(struct qcom_adsp *adsp) } ret = of_address_to_resource(node, 0, &r); + of_node_put(node); if (ret) return ret; -- 2.34.1