Received: by 10.192.165.148 with SMTP id m20csp4923012imm; Tue, 24 Apr 2018 10:34:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx48XgrqeUgzgWsrXKxffh+cj1VmjjUIWan9Zt9cRkNfdaQK6AEKdQFzMpxToNRyzg3ZLCD8c X-Received: by 2002:a17:902:481:: with SMTP id e1-v6mr26107885ple.377.1524591298658; Tue, 24 Apr 2018 10:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524591298; cv=none; d=google.com; s=arc-20160816; b=QJ2Ou36f4UAmV5odGEKxlocKczQ1SKxkQmsTvYyNXgxyybC8bNkSDzPiK7qxrYERiC MS9WEwTkI72nb4dofaODWc0Hdi2+LmhMwF7/JYtpxDKLue03Tj+Zgf9SnY2Cdr8eoqQb +Fpcm311EvdBgS2UtsDqBhm4MTSVLUxdaQdG5ALWwBn2VWv9QOWXkS6Jw4DL7NIObbSD aORLzaNY1X6CSG469o8QzOAHstVVd04AaepQdqfZz9HJ3ZubIpEaTCy6z6Lf4coCF+nh XPvLY8YjDZxOkrhyq8ofknbucqVasTobJXNkO2DdAM5YbVDkwvGSseo5wFuD22mc164k cWAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=PnYI0F/LVXNycGkRBxjt3XhlbPkdUWE24LV0YyQoDVs=; b=Yq6703R7FIbNoTIPM+opxprqXJJNyw+Tviyuj+HBC4PqUrdy8k5KtSztuKxxGLS5R5 eWPnW/S2J3i1AWcvZ65/B8589850YYpr/XxRLGx2VYoC0ypzeGoZX7mzrhsj+gORt/O3 e1bOE8wrjA1DnyxNiGWcIkKsZmZvsOsdCa+Aa+X72pwrBQF3CSTbgRzZ+DdOeKbpyi+D Ta7mz7AufmfRuPCNMK3V/pbZCehhEkA9qbzGlDk/omslgZqc3gQOOze9oD9xVVRUot7v /sPSezGdL3egLanW9m+H86AL/B4774AHlzaUi6LGQXsVqU0YXOWGte4XgQKZvJ0G6Hin O0Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=GSlfrKjj; 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 d123si2054013pgc.445.2018.04.24.10.34.44; Tue, 24 Apr 2018 10:34:58 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=GSlfrKjj; 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 S1753086AbeDXRdB (ORCPT + 99 others); Tue, 24 Apr 2018 13:33:01 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:49134 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752914AbeDXRc6 (ORCPT ); Tue, 24 Apr 2018 13:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PnYI0F/LVXNycGkRBxjt3XhlbPkdUWE24LV0YyQoDVs=; b=GSlfrKjjx2SuZCIRX4rej1HoC 2pTRbW6qcMAVXDkezzZC/orimgtk0vC0khezwWomlOo/X7mDtI+B8TY7cMj6e37kHITadd1og5pcA M70r5DmQam8YzT3o/EDMzKpNqF/z0CXLnaczLmInJQIUcnpsh14Mg3bJUL5S2zyII0UZU=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fB1oE-0000Qf-Ez; Tue, 24 Apr 2018 17:32:54 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1fB1oE-00039R-0f; Tue, 24 Apr 2018 18:32:54 +0100 Date: Tue, 24 Apr 2018 18:32:53 +0100 From: Mark Brown To: Stefan Potyra Cc: Florian Fainelli , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jonas Gorski , ldv-project@linuxtesting.org, sil2review@lists.osadl.org Subject: Re: [PATCH v2] spi/bcm63xx-hspi: Enable the clock before calling clk_get_rate(). Message-ID: <20180424173253.GF22073@sirena.org.uk> References: <20180419130358.r7dva6owy2izyfus@agrajag.zerfleddert.de> <20180424161605.GA17825@er01809n.ebgroup.elektrobit.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="z0eOaCaDLjvTGF2l" Content-Disposition: inline In-Reply-To: <20180424161605.GA17825@er01809n.ebgroup.elektrobit.com> X-Cookie: Take your Senator to lunch this week. User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --z0eOaCaDLjvTGF2l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 24, 2018 at 06:16:05PM +0200, Stefan Potyra wrote: > + ret =3D clk_prepare_enable(clk); > + if (ret) > + return ret; > + > rate =3D clk_get_rate(clk); > if (!rate) { > struct clk *pll_clk =3D devm_clk_get(dev, "pll"); > @@ -364,10 +368,6 @@ static int bcm63xx_hsspi_probe(struct platform_devic= e *pdev) > return -EINVAL; > } > =20 > - ret =3D clk_prepare_enable(clk); > - if (ret) > - return ret; > - We can return an error after the clock was enabled, this will leake the clock if that happens. --z0eOaCaDLjvTGF2l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrfakUACgkQJNaLcl1U h9D4bgf+J6y1UloIi6nrD3w10mYBHYTy/sHpIZUvMNIhg8AoJ8flP3t4TB4+djjJ HOG0IqvjlBzc0kyyOgGBW97z3HvTvy+iZAQgHctjhVPspVLJQ4sZq0FAnkonEMpZ 2aEVaYvijzInM6ooUE0a//6BGPtyX3V4y2bMcqyWZGx9AS6J6WZJHEInSlPngq5s +Zp1Wu0oHjPA6fsauACKbgWl5aheQy597RpksN6cNJMbvcxSsgZxHY7y2UG8s2Bl kaqDkNh34qbGudLd+eWk8aWajMDm1UevFaNj4FfS1wXXBiGOT0YqVj6ezEr4Dgoq 1w93AHUEleTSljxo+WZp8rv6+4I90g== =S6fH -----END PGP SIGNATURE----- --z0eOaCaDLjvTGF2l--