Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2159823iof; Tue, 7 Jun 2022 21:45:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKc8o2zo2N9G6oTr3PUe0Y6eOljL9P1n654JElv3d4wvy0aZdhKD3lHBbwdJ1MJl91kqn2 X-Received: by 2002:a65:580f:0:b0:3fc:ffa7:9a66 with SMTP id g15-20020a65580f000000b003fcffa79a66mr24542444pgr.332.1654663502853; Tue, 07 Jun 2022 21:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663502; cv=none; d=google.com; s=arc-20160816; b=V5BwlRer4DpNxvRatt0q+vSEgwFrb/7x79RrZcjiKkoqzvNI+cUWrfWSWkUrn3mRyE QDaZPM+rC+sB0UfTlBvIK9qjO/W+9HerNgCTLeYbNSPCq4HOLNZHAnwdmmfw3nyUNIun PErlwa50rF/w4u1HAml+RkMB2eEZo4BkTmvJJMznDkKeeQSoTJ+EfgKtUadcsQeDPzHn /UZL1KRw7ImpdR5fANXV7/hKp1/4petA456mrLGKAsPlAFGJXjfKklK/urc9TSgUb9jb QTmOspkCPoz1O4gL7KLJmfpF63jhmmut+e0iHTIiLNuasqaVOgJWSG3PW1DZlq6yXKJG 4K+A== 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=5tU13vg/SqDXSY9qXDTVsI4xeUmuyoAISa2gpl1IdRs=; b=iABnDcRPWF8YCHRhVv0gidAuGDyT9gs2SUeRG3zezEGSEqLvynvgf8UQ0hEFzU215T 7CrkQnwVbjcqfJcXCV/NDQjgzIBDqLlN4WiSnATTMzoHs3Wcq9DbX6BZQ91yUuqj/W7c tJdVGVf6waLdeDZ3ykJr1cwzXx2OGkRDTppf2ivmDBLcRsRozlJFldieLy00v7KtyaNT RWEseHi7az3kLa7l9tA5n9J23DwNahawL+cu+bWLdarKByuSvAyOa3P0vrWY5WloWK0n y6uQQyzoJBIgT5gkQIqxWue4yxBhYJaogHtYw3rAW5/0ZnvbSNSpbdYt0elaqW3+NR4V xZnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fNMeuffS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o38-20020a634e66000000b003f5fa8c55e9si26618967pgl.9.2022.06.07.21.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:45:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fNMeuffS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E69645738E; Tue, 7 Jun 2022 21:23:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386925AbiFGWtg (ORCPT + 99 others); Tue, 7 Jun 2022 18:49:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381308AbiFGVk0 (ORCPT ); Tue, 7 Jun 2022 17:40:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9368F232802; Tue, 7 Jun 2022 12:06:40 -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 2E3CC617DA; Tue, 7 Jun 2022 19:06:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E98CC34115; Tue, 7 Jun 2022 19:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628799; bh=ocfS7A3RXskJpAaCX74xsV9vLCUzdp7U0CdD+K9j1Jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fNMeuffSebsR52mtJuvluRM/FCvWKJASlhg1ht0QeV7hCyIfplOR4lNPvFivvQRIb l8ghZIFz+hIELSitS43jG58OY3XnjXHjdwNTIW9TcF71RKNZmQPk/ok3qfu7gBDxIi 0n/NY7Sso1huODWezuDxjFQMwIfqWVPpFeSIqUhc= 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.18 419/879] ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe Date: Tue, 7 Jun 2022 18:58:57 +0200 Message-Id: <20220607165015.024921083@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 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=unavailable 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 2be84f73785fa9ed6443e3c5b158730266f1c2ee ] of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Fixes: 08641c7c74dd ("ASoC: mxs: add device tree support for mxs-saif") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220511133725.39039-1-linmq006@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/mxs/mxs-saif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 879c1221a809..7afe1a1acc56 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -754,6 +754,7 @@ static int mxs_saif_probe(struct platform_device *pdev) saif->master_id = saif->id; } else { ret = of_alias_get_id(master, "saif"); + of_node_put(master); if (ret < 0) return ret; else -- 2.35.1