Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp657416pxb; Tue, 5 Apr 2022 17:35:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVfRUqkNYs44y0dGwSgaPt7c5IR0yL/v/OOITpLOFNljrWtdpFob9AreDlQjZ50x4yvTxm X-Received: by 2002:a05:6402:350b:b0:419:1c11:23ed with SMTP id b11-20020a056402350b00b004191c1123edmr6340121edd.8.1649205330356; Tue, 05 Apr 2022 17:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649205330; cv=none; d=google.com; s=arc-20160816; b=Rj2URUxB73tDK5/vQmzBpIHAcAY7vUoBVCypVtcl1SC55+fS0HvyOMWMJDU/1SwI4V mOsGtXRCrDm4BTtK+uUS58kE+PU7qbUECy5w1dSkujmCzNYzwciitb3LbKNwBq4lCuq/ 2I6+zhXnTzRxkvEBJ7G1RxMLLDSHJzZkmdHZufKUtT9nrJQYTbYnWTvg/Pxjrtl/NQdz WCgmGcJIhDY90Cgyl2+xIEmPiDjXnv/YeGIuq0I9NLKBqdq/1JnMETL2EQbBBQ+sBJgA cFj9w1R8JjlYt07MdRYno4NDdK2PVKgdb6oTe86rirPNbsPuG/2rhox+YFioeXk3bLKZ 3ppw== 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=54TaJFDqfbUQRPefIhMrVoffqQiqDzkuXd8TWvkXks0=; b=UXKk5kyOd57WC74NMggxGyzOWAVW6TowSg4RbaE3/FbKXu6b/NEBxSYohLpvdPdq6Y OuHDaXCzr3apH2Pr2Uo/+Vn70C2ggR/ugSGgIE8s37fOurcRLW2jgqmFvis9eIS4GdPE GzTF96ppGbOABw1ottkQfabl52lZoMumEy/jYu/G+kK8mOXC0ph0MiPaGHStAlHxBUOv 7Yb3tXshxt7DV3kuHoensoVwXLSqUG+D4fcUblIxN/xtphNuyQAFbRjiAFVf+RUQFaPn /V50vW+uReLi1cIr3qfwVV8ZJ3Jd6boQdRJ3NcR6ntgHd7CmPfnGtQpLeVQqAHqXOeEc 7wnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cEU0o1ms; 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 s18-20020a1709060d7200b006e7f5ad72d2si5175729ejh.601.2022.04.05.17.35.05; Tue, 05 Apr 2022 17:35:30 -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=cEU0o1ms; 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 S1376809AbiDEL5W (ORCPT + 99 others); Tue, 5 Apr 2022 07:57:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244999AbiDEIxA (ORCPT ); Tue, 5 Apr 2022 04:53:00 -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 4B28520E; Tue, 5 Apr 2022 01:49:05 -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 105DFB818F7; Tue, 5 Apr 2022 08:49:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AA5FC385A1; Tue, 5 Apr 2022 08:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148542; bh=vfQKJU19UMrW5LwepiqtiviNOCGXgKRJ9KQlocnkT/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEU0o1msjx8wOw7WuU2udzBgzmhOspwD1Pv0SJCjcUsSJHLDV4JCSBUfdCesMHGbo rZsMMMv8n8PXdSxkrbKSgLR5up7jWeQKUtaBUVrZ0ZwwmhSIy5YtoEpz9jTuITkhgW BhGzUYYMK3V+ScwGvKwcA64Dt/vqZVnM9azmPb+M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Mark Brown , Sasha Levin Subject: [PATCH 5.16 0394/1017] ASoC: codecs: wcd934x: Add missing of_node_put() in wcd934x_codec_parse_data Date: Tue, 5 Apr 2022 09:21:47 +0200 Message-Id: <20220405070405.981457456@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 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 9531a631379169d57756b2411178c6238655df88 ] The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. This is similar to commit 64b92de9603f ("ASoC: wcd9335: fix a leaked reference by adding missing of_node_put") Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220316083631.14103-1-linmq006@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wcd934x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index 654d847a050e..7b99318070cf 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -5888,6 +5888,7 @@ static int wcd934x_codec_parse_data(struct wcd934x_codec *wcd) } wcd->sidev = of_slim_get_device(wcd->sdev->ctrl, ifc_dev_np); + of_node_put(ifc_dev_np); if (!wcd->sidev) { dev_err(dev, "Unable to get SLIM Interface device\n"); return -EINVAL; -- 2.34.1