From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Date: Tue, 03 Feb 2015 12:44:41 +0000 Subject: Re: [RFC PATCH] ASoC: wm8731: let codec to manage clock by itself Message-Id: <20150203124441.GK21293@sirena.org.uk> MIME-Version: 1 Content-Type: multipart/mixed; boundary="py4RQBuvJMmLuKXJ" List-Id: References: <1422934415-24957-1-git-send-email-voice.shen@atmel.com> In-Reply-To: To: Manuel Lauss Cc: Bo Shen , Manuel Lauss , Liam Girdwood , Richard Purdie , patches@opensource.wolfsonmicro.com, linux-sound@vger.kernel.org, alsa-devel , linux-arm-kernel@lists.infradead.org, LKML --py4RQBuvJMmLuKXJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 03, 2015 at 08:54:57AM +0100, Manuel Lauss wrote: > + wm8731->mclk = devm_clk_get(&spi->dev, "mclk"); > + if (IS_ERR(wm8731->mclk)) { > + wm8731->mclk = NULL; > + dev_warn(&spi->dev, "assuming static MCLK\n"); > + } This is broken for both deferred probe and in the case where the clock API genuinely returns a NULL clock. Other than that it's the kind of thing that we've done for some other drivers, though it's not good to have to do this. Check them for correct behaviour. The coding style is also not right for the whole patch and there's a lot of missing error checking. --py4RQBuvJMmLuKXJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU0MK5AAoJECTWi3JdVIfQDKEH/0cfeB7iOzFR3+ko4cwSnoth 59h+3/agB1NnIiuOGG31HOcK0+YiW4hrE0lpz6kpHWXXfYrKXgd0IXChl2zixyBn 3ggVle1R7mnG3xgcq5iRUresTy59O3ShVoNxsse28lBPIOYcPvhZ7GuGuLUukQDJ K9b3rsrIaTQpLz/BeoVuEBkvCwTjFbHKE63mNjZsEGLDHlweaZ6aiQRhfr+qa6+d yPZFiRYPm8h8ZU9EYJ50GUmAxp/6IHwoEpKDHPYo7G4Pi+NkZWwKUmG8eA/RDUb1 6M3zdXFmksNIVJ2vs8FOMUsGrgI4VB8QSTus711U00GcmLKMWl1Y3lsUqtv38OQ= =88LY -----END PGP SIGNATURE----- --py4RQBuvJMmLuKXJ--