Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1864604rwb; Fri, 19 Aug 2022 10:39:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR5yQzAdNrGNumWTDpRMGxTvPpMCUHN6AlUme7oxm3tGIQcWcznKFBhGTptBxBTBlLBKyhGz X-Received: by 2002:a05:6402:5214:b0:446:12e2:2e7c with SMTP id s20-20020a056402521400b0044612e22e7cmr6474491edd.22.1660930779080; Fri, 19 Aug 2022 10:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930779; cv=none; d=google.com; s=arc-20160816; b=GvxkYA/7uEL4Tgpdz3mXEc88Py3oq9XmjEBBYAPtHbSfpWscyASZraScARLI846SUw F1lYVG6kts9RxBwqFLJ8sysikoaaQnKlJl1R9y7RuXUm5iZYUEIs8VNpDhP7DczJeyDv S3dsvfQcG7p31+VN6DM3ZqHop0IxjhIA4fj+2pZq0Kkp5aCUTNtWbeipltY8b/tjTNte pPFLtBtgScN64CrfimPjG5V9kD9FD5kZzm2hXbxbYUXBVEs4Jh1I6exT0NYnX9uftzQS jVmrhP71IxVe2mOht/zRrryFqqHzAEqkwanSZ8PQeqMSv1HRofjfUdU/LIgY1PZ+UuAU 1Y1w== 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=67o0Ml2l0Vj7oI+NeFPsRb7lGpk7e7HefYVR6W4s/nw=; b=B7AecpeXncm+6VRGg5zxHQE4Z8++A9j9YAhOKJ2VIxuZY4xcvUZlu49jJXWJg3dAdc QNB5Tacqh7lo0/Amfpi7NemHvxwosI518zUGCohc9nUjA7nNDe4z6jmb+rKP8gilD1Ur ofikzjDVYNnJlVYyOGnyDjeWKwmsvZXld+cb8sdKnUVN+vfjbxzNyeBiF6gqay1GZnYe dNatsvWfqKjDN9pAcjlwNylbkGTLTbO3VXUxrmyPe06iinxHPTiLyoEK44ugPt3MQooA pM+cUBSBKQV+hjIhJA98YNZ4VtR7LjYVRznJ22Qk0WwWo63yKWlLyXZa/i0V9dFRsaIz coHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V6TQ8yhp; 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 du19-20020a17090772d300b0072b4b0b6908si3382712ejc.892.2022.08.19.10.39.13; Fri, 19 Aug 2022 10:39:39 -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=V6TQ8yhp; 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 S1352777AbiHSQ3g (ORCPT + 99 others); Fri, 19 Aug 2022 12:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353165AbiHSQ0W (ORCPT ); Fri, 19 Aug 2022 12:26:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 659F8119130; Fri, 19 Aug 2022 09:04:02 -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 E83DB617A7; Fri, 19 Aug 2022 16:04:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E31A7C433D7; Fri, 19 Aug 2022 16:04:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925041; bh=qQHUtZWaWupbYZelFOYe4CltnFVzO3H9peKF0dVanHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V6TQ8yhpXCo15rDBuu+t6q1QssSSStrKXJZKyJeuj3RyyxGI2SZKfpnv1wnLY01ef AgUGANcGgoOPrsE4s7dSZeji7k20x9lqeQwO1YdioU+8JUCRSzfSitzgpUpdFD8ZIT pKh/8b3NkilVsb7Hy/KAPIFyyf9lfAI98s73AsbM= 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.10 364/545] ASoC: cros_ec_codec: Fix refcount leak in cros_ec_codec_platform_probe Date: Fri, 19 Aug 2022 17:42:14 +0200 Message-Id: <20220819153845.673909883@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 5c3b7e5e55d2..dedbaba83792 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