From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754806AbcHAS0f (ORCPT ); Mon, 1 Aug 2016 14:26:35 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:46618 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754739AbcHAS0J (ORCPT ); Mon, 1 Aug 2016 14:26:09 -0400 Date: Mon, 1 Aug 2016 18:28:38 +0100 From: Mark Brown To: Jan Glauber Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, David Daney , "Steven J . Hill" Message-ID: <20160801172838.GW10376@sirena.org.uk> References: <20160728083144.16625-1-jglauber@cavium.com> <20160728083144.16625-3-jglauber@cavium.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1RhGCd1AsoFHGRHc" Content-Disposition: inline In-Reply-To: <20160728083144.16625-3-jglauber@cavium.com> X-Cookie: Tell me what to think!!! User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v2 2/2] spi: octeon: Add thunderx driver X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +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 --1RhGCd1AsoFHGRHc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 28, 2016 at 10:31:44AM +0200, Jan Glauber wrote: > +config SPI_THUNDERX > + tristate "Cavium ThunderX SPI controller" > + depends on (ARM64 || CONFIG_TEST) && 64BIT && PCI You mean COMPILE_TEST. > + p->clk = devm_clk_get(dev, NULL); > + if (IS_ERR(p->clk)) > + goto out_unmap; We're now just using the normal clock API which is good but I'm now unclear what is going to ensure that the clock is there - is there some other change elsewhere that I'm not aware of? We're also not passing the resulting error code back to the caller which will break deferred probe. > +out_clock: > + clk_disable_unprepare(p->clk); > +out_clock_devm: > + devm_clk_put(dev, p->clk); There's no point in using managed allocations if you're going to manually free things... --1RhGCd1AsoFHGRHc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXn4bBAAoJECTWi3JdVIfQeQEH/2676yiEm8S+6e8Ydj4kqZmr peWvuXS1jEZ1NgSmsfurExIXd/sZR7B6eNRdPIyEtJv77HaAUxMbFr3J/29GKTMS og3crc4wgGoR9zPEBrqTFGDkTDnK5g2FxVsi7wNsQ6RDhcBm4rScJgVkbq5OHpWw SX8rf/U0TAUvsyMUmdQZGjwbGbSpWGnR96mxSax66LEg7yD6wU0MpUwoLkgS1nya xFfQ07/KuYl4R0dgQVdnl7K11YgJy0D0A3ihxIEMM7kk5AOoOdSaPFH43oBWIHPM nzYbgIopKbMpjzhbK2PqwAyh1DkR70gfUw9MLe8YJqn0oFsyxPwShzWZPg3/ObQ= =F/6Y -----END PGP SIGNATURE----- --1RhGCd1AsoFHGRHc--