From patchwork Mon Sep 4 12:46:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 111580 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1482666qge; Mon, 4 Sep 2017 05:47:09 -0700 (PDT) X-Google-Smtp-Source: ADKCNb48G02iTcsXQtEmxDg15IbFZ66jE2xFcwFGYtELFxQBlASe/ARaQXMxNyiLSqAj3YMHljIb X-Received: by 10.223.148.195 with SMTP id 61mr246538wrr.36.1504529229189; Mon, 04 Sep 2017 05:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504529229; cv=none; d=google.com; s=arc-20160816; b=BDTrDp1hLdMlxZCDZ/RAMstF51J+YQRFUi/r/9FN0/g8dSz8/V1bDLkYxiJqlsopS6 P2OAYGVGzVeK6h5Pcykqb5AjwHzwuaULHC3LyGbuTjSK5HTVpfqqjki+4EUSYSSS58nu TlVnzCRvR6b29NVFGmoOnDAW0qcNA0W2mEoyYzs9Y/Gx8YxHKi56RQ7Z6Ks/wCeWiS9V RGmHy0IfvUlepGEXeADVTQNs+q/rlLFLwJ8gwYjwR0Ws+qC7IJHwmqBWdC/7xtCZvkhi FSPdriqxpnhGA7NWhHVzKcq+WCzXcQcjDYjFLusU33+K6wd/7DT4pNuEEuoSxIXUlsTl 7hjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=gd8hWGdQXvESxrxu4Vwxu41UPwinWMgrouDy3+MVfU4=; b=ei3AwkDomd95LwtQ6IUlPZgD5TPPSn/G9Hdve3ttyuR82lkEqZvI1iENrr0eK1GsYm W7Ffu+XlOJUhJmGVl98JVu0t9qDJYxmV6P6RWkdWIBJl5KvOPV7JAsva8cG7UsRLez74 ekBD3py/apXralsRj5MBBlqTqGNmH+s0xRaUiqLpxhWY+qe6KHV/CCW0s+VOB7BC1wnP KiLcv0SovE0FQuGG8s5IyUCD9Dn/DcKsQg0d372LORe2d3I+Lxs49xZ1qWpgdLtFtuuL fUvqaMT/PY/1yi+WsemBh3ekGOcnT6i7VeZlEeqIC89oq23wxIqQDMHVde5O1Hs3vWBP eIGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=pFP+F4D5; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id t7si2318686wra.370.2017.09.04.05.47.08; Mon, 04 Sep 2017 05:47:09 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=pFP+F4D5; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D67E5267031; Mon, 4 Sep 2017 14:46:43 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 309FC26702B; Mon, 4 Sep 2017 14:46:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 16D1D267026 for ; Mon, 4 Sep 2017 14:46:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=l22axylTS1ftIALLrQJiO1ozfbnytsRV2nKDNNsI7Q4=; b=pFP+F4D5IfCH sxIpmxZJtPZyWkzd2EPVWrCX6cBnIBgjd/yALh+TJe2J/CpWZbtROVX81n/hgGCMBMUcCBjft0lQ4 6jYoH8Ry3GFSUfYyrZ2l5IYOVMfMlwjtnddKul2JcWNrkUPTrfnRJ4vn8PNrKpmRCeoBck9tQRicf XDYEw=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1doqlz-0003VY-9H; Mon, 04 Sep 2017 12:46:39 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id DB4C44400FC; Mon, 4 Sep 2017 13:46:38 +0100 (BST) From: Mark Brown To: Christophe Jaillet In-Reply-To: <20170903122902.3591-1-christophe.jaillet@wanadoo.fr> Message-Id: <20170904124638.DB4C44400FC@finisterre.ee.mobilebroadband> Date: Mon, 4 Sep 2017 13:46:38 +0100 (BST) Cc: alsa-devel@alsa-project.org, sbkim73@samsung.com, linux-kernel@vger.kernel.org, tiwai@suse.com, kernel-janitors@vger.kernel.org, lgirdwood@gmail.com, krzk@kernel.org, broonie@kernel.org, Christophe JAILLET , s.nawrocki@samsung.com Subject: [alsa-devel] Applied "ASoC: samsung: i2s: Fix error handling path in i2s_set_sysclk()" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: samsung: i2s: Fix error handling path in i2s_set_sysclk() has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 6431a7e36652517df82855ee79c8240001812a55 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sun, 3 Sep 2017 14:29:02 +0200 Subject: [PATCH] ASoC: samsung: i2s: Fix error handling path in i2s_set_sysclk() If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock. Othewise, there is a resource leak. Fixes: f5c97c7b0438 ("ASoC: samsung: i2s: Handle return value of clk_prepare_enable.") Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown --- sound/soc/samsung/i2s.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.13.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 10a4da06c0a1..d7e7f4244d38 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -552,8 +552,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, } ret = clk_prepare_enable(i2s->op_clk); - if (ret) + if (ret) { + clk_put(i2s->op_clk); + i2s->op_clk = NULL; goto err; + } i2s->rclk_srcrate = clk_get_rate(i2s->op_clk); /* Over-ride the other's */