Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3259647rwb; Mon, 15 Aug 2022 22:33:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR6eH4X9i8QWhYgvGd2v998gI1zFFecfJukLBd82Og0+M5EBUIBtC9xeEA50wnlGfr0nXpa+ X-Received: by 2002:a17:90b:3e8b:b0:1f5:8706:18a1 with SMTP id rj11-20020a17090b3e8b00b001f5870618a1mr32287810pjb.112.1660628012924; Mon, 15 Aug 2022 22:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628012; cv=none; d=google.com; s=arc-20160816; b=xXSfNcAyHX/8r54PA/wAYLKBkE6zu0XjIWlDFsgyASYDugs1DNGK0ygq+AnW+5bYfc Ninj36MYlR3S71FMdpinMCuvVMKS323Bv2OmwjbOCzDTPSZ01cTD0Mt3vJABud2daEOs ELIxcAiA7YJ33wVCtIG/zPz6dIb8XuI8KQhW2ePFUBMRrby8zaY0taHilCOxioniyqBm BDjD4tUTWTEoekrCjUIjx48qys9sX8k6T5dD5zVI4eBnXfafCQzZZDLaUEh+3j4IKOha XJn2G3izasMLx+n1jKsDPuqx1tjCtVrxO+Bjf/MeKFpBXcXbZe+M4X24br8ZjLUWzKC/ dEtg== 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=Jm+03WOwWkSuslQI8AWeUtjsPXxQunJJatTQJCbzUSY=; b=PejrTEmrKbtgWUzUiUd67mhlblGKutKH/k0jwVapI5O6tum5q9NhUlFyKbADg4Ar/d mC/ZH0fibJsdUVVSdUELkvHp4Uau43AVwydqhlZif3CRYW631KYLG5PmhQAGgQ4gxE++ Qdig7XPjSzKKS8MoO4EzAc+ZDptShPlPU6u+TcMu15NkaBbLmP09dQgVbwV6I3oOmn+d WhrypPCD1rEL+6hCZB1qHCAc3bLYbOqATa3zNL3WCxUa8Xt2USAznU01YATf2b6UvApc tnczYS6DOif8XUK27Ghiu1Nqp5uVOqei3EiqiwqaxQGQa1UbzmWwAjk3uTgOyeKGk01u USmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TDkEbcHu; 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 j1-20020a63fc01000000b0041b539aec98si12211077pgi.816.2022.08.15.22.33.21; Mon, 15 Aug 2022 22:33:32 -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=TDkEbcHu; 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 S232724AbiHPEpr (ORCPT + 99 others); Tue, 16 Aug 2022 00:45:47 -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-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 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=%#llx len=%#x\n", priv->ap_shm_phys_addr, priv->ap_shm_len); } + of_node_put(node); } #endif -- 2.35.1