From nobody Mon Sep 29 22:46:57 2025 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 5D9ECC28B2C for ; Tue, 16 Aug 2022 04:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232743AbiHPEpt (ORCPT ); Tue, 16 Aug 2022 00:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231727AbiHPEmL (ORCPT ); Tue, 16 Aug 2022 00:42:11 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4450188F9F; Mon, 15 Aug 2022 13:37:28 -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 sin.source.kernel.org (Postfix) with ESMTPS id 671CDCE12E8; Mon, 15 Aug 2022 20:37:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B014C433B5; Mon, 15 Aug 2022 20:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595836; bh=JxdO7+z8WoOuFzY8CDdjEdnBy/DYNon9zWRtGOieI0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TDkEbcHucuAFsoX8/hfyLZvtO6MCuXhUEHyIJGepySpTeqm1koLzsrSH53bMMsv6G FiZiGFfPOpRoeumTNM6Zu+cH+zCmMu/2SOCb/0pd0+asycMO5aJPsJHV6JGKUug27z vSaaifDVUQIS45mZaZelnRIK7Vm7zsY1Bx0Igf14= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Tzung-Bi Shih , Guenter Roeck , Mark Brown , Sasha Levin Subject: [PATCH 5.19 0890/1157] ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe Date: Mon, 15 Aug 2022 20:04:06 +0200 Message-Id: <20220815180515.051714597@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Miaoqian Lin [ Upstream commit 0a034d93ee929a9ea89f3fa5f1d8492435b9ee6e ] of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: b6bc07d4360d ("ASoC: cros_ec_codec: support WoV") Signed-off-by: Miaoqian Lin Reviewed-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220603131043.38907-1-linmq006@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cros_ec_codec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_co= dec.c index 8b0a9c788a26..11e7b3f6d410 100644 --- a/sound/soc/codecs/cros_ec_codec.c +++ b/sound/soc/codecs/cros_ec_codec.c @@ -995,6 +995,7 @@ static int cros_ec_codec_platform_probe(struct platform= _device *pdev) dev_dbg(dev, "ap_shm_phys_addr=3D%#llx len=3D%#x\n", priv->ap_shm_phys_addr, priv->ap_shm_len); } + of_node_put(node); } #endif =20 --=20 2.35.1