Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2869666rwb; Mon, 15 Aug 2022 13:00:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR4epuYSLM8SLjIKvyfooS9LtHw8RBb5j54TaxC/kTt/oUtoi1wpudAGYHNSf3tpO5SnpOgh X-Received: by 2002:a17:907:72cb:b0:733:10a8:fd5c with SMTP id du11-20020a17090772cb00b0073310a8fd5cmr11234645ejc.498.1660593637750; Mon, 15 Aug 2022 13:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593637; cv=none; d=google.com; s=arc-20160816; b=dxpryj/TvEls35Z8b2ObVfe6dJHvoP+mCBy9fttD9SFw/3zqc55Y6gnxwZ81A9tzGU hZSnXz+Fd5ecGjbqL5vn6VyeM4SAUTw/j/lpW54zowpL0u8Dmecrpe6nJsqcxBF2iZmm F73rXAJOP8DM4myWt1s/owBbWSpBIMSsAQWTDm8IqusZtIC9iYwFcw9V4lUlfrsRVjKD 9wrvwqJLV8rFOb3lmPGOtwVwHGmKVP5aRgcIphG2/83FiRXQVx2W5xWJYJhsOom45bf6 3cI7qbR69eIJe7Qvsh5h6nHPREWDhgHreYDGds3ECSD1Pd1sC7NAxXX6xNeahzMQF3xF 3Qzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UPIgpvr59EsIBlxnvphMbwhAT3xgsBFjyJjIhPsbJrM=; b=iOOa7yeOS3EWBVwd3g2C8QkzTTSjjD6PywWa7y9G35zy58Tt03TMrk9VH4qNGS1fKR 1w3C6onnBwW1fdZBgvfjRwcd/HfJ9UKNyn1c8LsIYckDqpd6MV77kzRFxqtb+XHj5Gsu 7BwTLpA7M5JsPyGbDlOD+ahtX52rPP0/8an+pqN69IERF8I4L+sABrzoYcorQToS+Rzx CH6vCKXzacwGuat/Bf37S6eyzs/c0KZIgKaAyKUTcsVjqagXXIBkp9fmdA5dJ4RIpU48 5lUmgqLtdDPj/rasd9/Ex/YA/WV8nMhiqlyJgFDEAhdhzj2dNlac8qQccaEmoc/kyCzz I1VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0auD9sJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a05640205cc00b00442edebe687si10000723edx.633.2022.08.15.13.00.10; Mon, 15 Aug 2022 13:00:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0auD9sJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344011AbiHOTgE (ORCPT + 99 others); Mon, 15 Aug 2022 15:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244747AbiHOT2v (ORCPT ); Mon, 15 Aug 2022 15:28:51 -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 030195D0D3; Mon, 15 Aug 2022 11:43:58 -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 93EF8611C1; Mon, 15 Aug 2022 18:43:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80E25C433D6; Mon, 15 Aug 2022 18:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589037; bh=JKSsVhydSCnFVOkIw5jQLYVlmg82JtFskndc5/+TtqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0auD9sJoisOKhm7AWXY2oP+LdD6yiAaX667e+AC/3MDntNYNoV4jgp/+smzGHITfY Fe6u1++i+5OlkAMKHbPJ6aXCyQvmf0JkHUJGfCmQDgkF2iN7uixenqpbTajqP2J0BB mw1FWw2Km626e8RRQm3t6SYs+b00kT5o16y51VeM= 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.15 561/779] ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe Date: Mon, 15 Aug 2022 20:03:25 +0200 Message-Id: <20220815180401.315845366@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_codec.c index a201d652aca2..8823edc35113 100644 --- a/sound/soc/codecs/cros_ec_codec.c +++ b/sound/soc/codecs/cros_ec_codec.c @@ -994,6 +994,7 @@ static int cros_ec_codec_platform_probe(struct platform_device *pdev) dev_dbg(dev, "ap_shm_phys_addr=%#llx len=%#x\n", priv->ap_shm_phys_addr, priv->ap_shm_len); } + of_node_put(node); } #endif -- 2.35.1