Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp441645iog; Mon, 13 Jun 2022 06:05:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u65Gc0t7tO5bjFLk5Kw6xlampKZsEoUUCl4fDyRW50DtHJ9bnjIxQ8m7iOSGV5h6416uqn X-Received: by 2002:a17:902:ebcb:b0:168:e3ba:4b5a with SMTP id p11-20020a170902ebcb00b00168e3ba4b5amr2640255plg.11.1655125398014; Mon, 13 Jun 2022 06:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125398; cv=none; d=google.com; s=arc-20160816; b=TI18rr9nNzvnGy+v+xujRdbxDv/PFGD70IxkgpkpoEjs9EYZs1JDxBK2xucaYyhWZQ O9Sa3XFkYHyV+a0EPdX1lgT0nocfb5oClE7IYbh8KjXF07dt+DgZ5fPGi3EP8mOCXvpa Fxhd5Hrhujrlv2PDbyx89k8aVn0MaOnefo9lwwMBCfkKPpohbOHWZUmd5N3oXn7f8vEl L+rlrtvq6dMC/bonduPqcJBjGWQizBjVU9crJli0RxDAbAxKH5oBz5xhoiJSHS1rdGRC yFkN+XsdaP0uQZu6IyiezeSm6H7FpIP01lwg77Y1cEubARb8r2lgev7kuPpEGnsFw1Cr pSOQ== 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=EJ1UX/O4nYdsMef+gBBMdUuR/Sh/7JdKYyL6Yrhgs2U=; b=P8lEqwWLZ8LFE1GXZ5W27GlE9GUMl2I4CSagq/3GU2YaRjL94IvA/CCqzF3TJxfCGV CiHXhXnqp/Zj8L3GTn0YzfBRYHElzHVQjA94xpue9dqufELvQBVqS3AbK/31gSRHl12z 4H+2Y62OAE5KGZqaRBh3zTE48lnAXJcfS3/6fVF2LCZOK2TNYfxW5TpCZ+6m4iqPf0V6 U20aSXvQzuQMrbOjE8YTlLVjvji1e5GfdlFDen9EeCbsYv2ATWyS0JxQE8ZvFMbb8rct /bvgp37YCxrUqV80Nl1S6WsTSgdWIi0EvlpBLQ53FOc78jnPSlqZzPZsPrhVgRwAPATL Rdpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zGmGClYm; 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 p29-20020a056a000a1d00b00518fc8adc58si10568581pfh.380.2022.06.13.06.02.57; Mon, 13 Jun 2022 06:03:18 -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=zGmGClYm; 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 S245695AbiFMKrO (ORCPT + 99 others); Mon, 13 Jun 2022 06:47:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346797AbiFMKns (ORCPT ); Mon, 13 Jun 2022 06:43:48 -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 95FB7DEC1; Mon, 13 Jun 2022 03:24: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 55935B80E93; Mon, 13 Jun 2022 10:24:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF96CC34114; Mon, 13 Jun 2022 10:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115897; bh=1m6/EIMpGD2Yh5Dld9xGWKJ9tHNx3A1+nVUUHQqiN/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zGmGClYmWVkFpQo5v0vcgysCkqFT7AirI1VtPM6Y7Ro5xhqhzO6+orwXSgx7xAl8t moVYlN1HMW2bLQPsnSlrcyMusPDcHAmdltvNZlxG89KTyRBs9ruyy9gKvvGfGRVgBX 1Kq+pohHZn1yn40IcT7mDkd/lgGsiKRjIkEs18zM= 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 4.14 070/218] ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe Date: Mon, 13 Jun 2022 12:08:48 +0200 Message-Id: <20220613094922.260176242@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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=-8.3 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 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 93c019670199..6d0ab4e75518 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -780,6 +780,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