Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751652AbdGZOrd (ORCPT ); Wed, 26 Jul 2017 10:47:33 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:37196 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbdGZOrb (ORCPT ); Wed, 26 Jul 2017 10:47:31 -0400 Date: Wed, 26 Jul 2017 15:47:12 +0100 From: Mark Brown To: Arvind Yadav Cc: perex@perex.cz, tiwai@suse.com, krzk@kernel.org, sbkim73@samsung.com, lgirdwood@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Message-ID: <20170726144712.nfn5jvkjfo52tffv@sirena.org.uk> References: <84c0014d4dbd466f52c45d8efbd2c1080d8174fb.1501047400.git.arvind.yadav.cs@gmail.com> <20170726112817.sdcfz25nhiitkhd2@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4arruq4saz5zl5kd" Content-Disposition: inline In-Reply-To: X-Cookie: Do not remove tag under penalty of law. User-Agent: NeoMutt/20170609 (1.8.3) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v2 01/11] ASoC: samsung: s3c2412: Handle return value of clk_prepare_enable. X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1733 Lines: 44 --4arruq4saz5zl5kd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jul 26, 2017 at 05:35:32PM +0530, Arvind Yadav wrote: > On Wednesday 26 July 2017 04:58 PM, Mark Brown wrote: > > On Wed, Jul 26, 2017 at 11:15:25AM +0530, Arvind Yadav wrote: > > > +err: > > > + clk_disable(s3c2412_i2s.iis_pclk); > > This will disable the clock if we failed to enable it which is clearly > > not correct. It's also matching a clk_prepare_enable() with a > > clk_disable() which is going to leave an unbalanced prepare. > s3c_i2sv2_probe is enabling "iis" clock. And s3c2412_i2s_probe is enabling > "i2sclk" and "mpll"clock. If, "mpll" clk_prepare_enable fails. We need to > disable and > free the clock "iis". and devm will handle other clock "i2sclk". In this > code we have used > "s3c2412_i2s.iis_cclk" for all the clock which is more confusing for me. > Please correct me if i am wrong. OK, they are different clocks. This inconsistent handling seems like a big part of the problem though - it's going to be a source of errors. We're also still only disabling here, not unpreparing, so we're missing something. --4arruq4saz5zl5kd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAll4q28ACgkQJNaLcl1U h9AaXgf/UfCtPRkwiy21axXkJX+UtF0lTsXREK/Kw8SNbn9aLhZdOjAlCWMhwZzE njy4nHEKGTcVnQOB2PlvuxnQdsNZzBZ7MeohZzBS1unJW2kizJpaBHB/+oJHsLt1 OTMh1rxrvd4uwbfVFgeh0DALbSsdeFj3d2pa2y4FRuaD+BPdPMq6V51DSTXr0L1R i8/HlzZf8lJpHej8MarD6WEhK4uan4vrfzf80zZFCKtyFqmEbR3IvQTCNbBlYwUZ uatMViIa9H3eBOP+wAMezlWSfF2K2iKjJGi1yjhv6gRhxqjfKlnyNEcYdWz9eIH3 jW7Zt0qGQwQro5WGaiXnkzcCREKybw== =FWeJ -----END PGP SIGNATURE----- --4arruq4saz5zl5kd--