Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp270768ybi; Wed, 29 May 2019 21:05:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/St22o65tjV8zyFBn4aHSIVgqYTcr3ll0Z/6n8dUPFmOQ6L5LzHj1RL9MdOolTS9BD/8Z X-Received: by 2002:a65:5248:: with SMTP id q8mr1816141pgp.92.1559189106805; Wed, 29 May 2019 21:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189106; cv=none; d=google.com; s=arc-20160816; b=yHKq2/vUK4LxB7cwy4H3QZuzzxr/E0jVMlWqt8kxLpH9+vB95Ev+XJKA7jxVbu4rb6 2AgQfEg1LbuBSVukkOV/ueyj8uUixxJBLOfCrLuWYoV7EsbkmuP34hGuS+v7MwlM+Peo RLa1CMEtV1f8+MVf/aLJr+zsyfUSXR6VcN600h8DhSaEA8nRv0p9eyoI+0t++pNOiWSB FcBA4eDoK9UJNWCJMqzuxOMSWpt/Itvco38TUzT6R29e96sMFFSHoB8ezlk5jXp/1u8A /dy95YZQme/D0rlTsuJy/eRGNO9SiGlQC8vUU3aS+is3eQICBbtNpU/vKESHgb20zrhy lmrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w32yhyKKM3tUGO5twoQ6uO0V+7D56dhPLBd8NRgmiQ8=; b=UmYboxO1JUhyjzqj/ptKPoco7SKi8VQs0yh4uzYHdLHmIfkBeunokOssSjZDHFxW2k C+KnI/sQlU+tS0xwnfY3gdLJw6hYPpc1A8Fj7tq49xaipBv9qNQS2QtWdfVX3oqiv4ug zzZOMyPbEzKcZXnNuPBvpFtJ/xk3/VrZPDDVNz8Fr6EwrAcsu6k7Zi7jIWQI5sxDXBY4 MgFCbhvWJMGOB0+Ud+a1KOKJHHIiyOKAUdLEeyqWJxMRJken0hcxnK6EIEbef1p5lzOV Z3lUfT9NQg8kyDsa89Msu5QCEorMkMLUB2PlaEGl1kD1tiVSVfHTsRa0Skp7xONrNSJy KKUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UL0u7tSU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si2177957plb.11.2019.05.29.21.04.51; Wed, 29 May 2019 21:05:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UL0u7tSU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387448AbfE3EDw (ORCPT + 99 others); Thu, 30 May 2019 00:03:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:49112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731329AbfE3DRy (ORCPT ); Wed, 29 May 2019 23:17:54 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EDE3924479; Thu, 30 May 2019 03:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186274; bh=MUReWeJro4bxc7yBDsWgZz5yQ6ksbBFwyAHIyxQ+gJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UL0u7tSUhErc5Y8FNYg/h6FnYl5PI4WurIq+ocV5iLEqHXZcj/TBWu0I/k1InHgaE vbPFxXmeFlspGEQ5+Dk/8hOMhCMA6l6G7H9uyrFJj9MOGWDul5vlCOQRexpsW0Wa67 o86gQIs5hgRqspbI3CvgkjHrJZKVPSWb7kbfhhHs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wen Yang , Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, Sasha Levin Subject: [PATCH 4.19 215/276] ASoC: fsl_utils: fix a leaked reference by adding missing of_node_put Date: Wed, 29 May 2019 20:06:13 -0700 Message-Id: <20190530030538.571433062@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit c705247136a523488eac806bd357c3e5d79a7acd ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./sound/soc/fsl/fsl_utils.c:74:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 38, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Cc: Fabio Estevam Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/fsl_utils.c b/sound/soc/fsl/fsl_utils.c index 7f0fa4b522231..cca33ab7020a4 100644 --- a/sound/soc/fsl/fsl_utils.c +++ b/sound/soc/fsl/fsl_utils.c @@ -71,6 +71,7 @@ int fsl_asoc_get_dma_channel(struct device_node *ssi_np, iprop = of_get_property(dma_np, "cell-index", NULL); if (!iprop) { of_node_put(dma_np); + of_node_put(dma_channel_np); return -EINVAL; } *dma_id = be32_to_cpup(iprop); -- 2.20.1