Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3018707rwb; Mon, 15 Aug 2022 16:15:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR7BxQqrhzB+sslYb8zvlpUS6BPzZei8vjR/wt44VqxBKowpPJbf7PLeEJjY3n/hqIiHj7C+ X-Received: by 2002:a17:906:d0d0:b0:730:9352:7484 with SMTP id bq16-20020a170906d0d000b0073093527484mr11885230ejb.70.1660605333825; Mon, 15 Aug 2022 16:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605333; cv=none; d=google.com; s=arc-20160816; b=Cs7nPAD28vGeac6g7mquzdtRHmOjMpA61g2/1csMkT87FE6SCFn7DoEHrmhTw8WiVW BvBQSc2eiLf9vq10FVd9J8KNCR4e7OMp/Gg2Kvo05S0D6KWxpk6lUq93+2e036sS47ts VKVTkLKnveILNbeLmtbuxCv4lg83suSfh1bAPt7SlscKMZZ8YEQL9JX5LlGf3x84oJoB BO/jU7jh9d1/w0hUIucnbe05ii8eBy4dcYDvx/gCGP+Qvct9771aWJenSDbzn8RQ8A+i D0OS6efzJEJBIT1NdopzkFqn1D2J7Eu5JwH7MKFOU6d0LkO+ska6B2P7FjOGqG4JHbmT jvag== 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=a+ruKeorcxLUvYwAHbteEew1DkTCo8vDeGYQNrxRQG8=; b=p3g2TpP3Lyq7tQtxTPfjVrX2wpkCQRvVLqKuJkljbTpOvRLs42B+vQUhJ/1pMA32L0 +H6ppuM26+oJHA4xVrZVDeD6RVW1a+0C3IWf2nePrH9s7aSj9SGl+P/Uv0ixCJbRF6pV h/JXs+dhOKhggBWCl0cbm4zy+ZYFczPJN5cRR47FjoXyIgpTa9qGW0DGlEelkazmojpO e1/S5cS8CDMXz2ATbqU9Z3e2r0OYqX1z8XNY4N3TlNTWiKB4FgX1bT6rFIYpmHr49cwz pTJ7qakFLvQBnWR+eeSMJ6eOYNtKN+mlkCgXlAUP3GAeO3CIJvslclPSiHOqrfcVPoZ3 xzYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HpeRcdOe; 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 sd5-20020a1709076e0500b007330a081f1fsi8542212ejc.679.2022.08.15.16.15.08; Mon, 15 Aug 2022 16:15:33 -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=HpeRcdOe; 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 S1350713AbiHOWcH (ORCPT + 99 others); Mon, 15 Aug 2022 18:32:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350526AbiHOW05 (ORCPT ); Mon, 15 Aug 2022 18:26:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BB213D06; Mon, 15 Aug 2022 12:45:26 -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 ams.source.kernel.org (Postfix) with ESMTPS id D351EB81136; Mon, 15 Aug 2022 19:45:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4310BC433C1; Mon, 15 Aug 2022 19:45:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592723; bh=PGsH7X53hqcrhMfnuWcNIonub3vj1ZhhjTZV5SkOJ+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HpeRcdOe6C0VHOW3/81mwfJu2zLQm4EscnuQLSshcwDzEBGRbDAgG5cJAIe7KERGz GvH+LA6mOOf5flbO/VGoVzpEOPoaEJ2j/1S/Tz3EDjeD7Ynx9Zz5g3gotvSOlqR2nS v2S+n3Hxn6+sb3v4yYDs2+MITx7gbV0G/65kXW30= 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.18 0827/1095] ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe Date: Mon, 15 Aug 2022 20:03:46 +0200 Message-Id: <20220815180503.518632141@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 9b92e1a0d1a3..43561ff1bb8d 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