Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp985832pxb; Wed, 6 Apr 2022 06:04:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd+D7Mgw9O+zOkgS7TkRWVojTv4HVnezkB8kNJoglsivB22958cZiH7YFb4veHN4WuL773 X-Received: by 2002:a02:c85c:0:b0:323:7196:6226 with SMTP id r28-20020a02c85c000000b0032371966226mr4693396jao.108.1649250275926; Wed, 06 Apr 2022 06:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649250275; cv=none; d=google.com; s=arc-20160816; b=gldFPb5Prvs/WSBX5Gl9N4vXGJcQMJVsPRQckjhvW4dX3lISD7O6o3sWA+m9O2SC9D 36NceXSPVkSVFmPZhyCSIsQ52l/bephL8XfErIvzoa2ETI7FJTFF0iH0dT1SZfqUAMI6 KeM1BgAP235gZ3O/PRbGS37neOakCZEjcMMJmueoOBoWH8PhfOOM2BIctLF85huUbqUx 2hMoGlYznrNFSUUnUJFkU80b6nsLhI2vYm8wCkdCRN1J5FiRSkxkv9KBQMNez7xa1vrM hMke51nBoHvB7vpLeM1endGve3ol57pUP/x+SF9Ou4l5qNne4gPynbbihcu37t4utmFf Y4AA== 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=Tp743Y+xZYGwUJz3LSrhg6QKP5MhIDT8g1OYpKYx3fw=; b=S2S66NdhCxiSL9e3HPpyFcKyZe5Cnxs7vjL6o9BBhoks/51l7TGn3DqhbhFfpDtBcr LKWB4WVAawlHRRgHErlpJ4Hw+PFAj3ow0w/9hG+LH7FdwdiyNMI0k8TYaAs4tgv5L/Gn bW0Sp6VvVTtS7n4AOGKZfz5UDQC+a81jfVSOmaOPoKEAhvniFnlDfDP1bwjFf+FXyxaX FVIAqgmgbdQ4K4HB2B+MRpJMg+T7J0TzlL2UF8K4IQayJYEWE/qgg5gkq+QMLJ+1dtJ/ Kq8BYW4dL5pTsCHk0VrDPMDuLAN/8v3Bjnja30rl5hRGc9Zkzow9tFNFTeXYPJmwE266 DT7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zwaQbExc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c25-20020a6bec19000000b006495808451fsi8473042ioh.60.2022.04.06.06.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:04:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zwaQbExc; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E7F3F3CF4B4; Wed, 6 Apr 2022 03:25:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238913AbiDEITa (ORCPT + 99 others); Tue, 5 Apr 2022 04:19:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235568AbiDEIAB (ORCPT ); Tue, 5 Apr 2022 04:00:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 559451AF35; Tue, 5 Apr 2022 00:57:59 -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 0B06EB81B90; Tue, 5 Apr 2022 07:57:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6107CC340EE; Tue, 5 Apr 2022 07:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145476; bh=LyccWJeuGNrn+SR6M3ykMhdTGgc0tH/cIGRmoeh/6RM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zwaQbExcUklOxavRS+g6bkYuT+o4Sy8UWP0hgosSfhrJ90k+coC44vVmwwTMjBlLK 9CegNlSjM+DMZF4dcafnnBLa74cobSSD7GmD+DBLhce74j/DTDsaHd4WtHS5/VlwkL SRCsbwH0IpO1igQT6Rh6eTCoNUftysQB13WX27jA= 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.17 0418/1126] ASoC: codecs: wcd934x: Add missing of_node_put() in wcd934x_codec_parse_data Date: Tue, 5 Apr 2022 09:19:25 +0200 Message-Id: <20220405070419.894957531@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 40b414867872..1e75e93cf28f 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -5886,6 +5886,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