linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Jonas Gorski <jonas.gorski@gmail.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Olof Johansson <olof@lixom.net>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 1/9] ARM: ep93xx: allow NULL clock for clk_get_rate
Date: Wed, 19 Jul 2017 07:04:40 +0200	[thread overview]
Message-ID: <e700ebab-0fd1-f699-3b1c-d528bf003a8e@gmail.com> (raw)
In-Reply-To: <20170718101730.2541-2-jonas.gorski@gmail.com>

On 18/07/17 12:17, Jonas Gorski wrote:
> Make the behaviour of clk_get_rate consistent with common clk's
> clk_get_rate by accepting NULL clocks as parameter. Some device
> drivers rely on this, and will cause an OOPS otherwise.
> 
> Fixes: 1d81eedb8f6c ("[ARM] 3634/1: ep93xx: initial implementation of the clk_* API")
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Reported-by: Mathias Kresin <dev@kresin.me>
> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/arm/mach-ep93xx/clock.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
> index 39ef3b613912..f0768befafe8 100644
> --- a/arch/arm/mach-ep93xx/clock.c
> +++ b/arch/arm/mach-ep93xx/clock.c
> @@ -316,6 +316,9 @@ static unsigned long get_uart_rate(struct clk *clk)
>  
>  unsigned long clk_get_rate(struct clk *clk)
>  {
> +	if (!clk)
> +		return 0;
> +
>  	if (clk->get_rate)
>  		return clk->get_rate(clk);

  reply	other threads:[~2017-07-19  5:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 10:17 [PATCH 0/9] make clk_get_rate implementations behavior more consistent Jonas Gorski
2017-07-18 10:17 ` [PATCH 1/9] ARM: ep93xx: allow NULL clock for clk_get_rate Jonas Gorski
2017-07-19  5:04   ` Alexander Sverdlin [this message]
2017-07-18 10:17 ` [PATCH 2/9] ARM: mmp: " Jonas Gorski
2017-07-18 10:17 ` [PATCH 3/9] blackfin: bf609: " Jonas Gorski
2017-07-18 18:54   ` Masahiro Yamada
2017-07-18 10:17 ` [PATCH 4/9] m68k: " Jonas Gorski
2017-07-18 12:03   ` Greg Ungerer
2017-07-19  9:06     ` Jonas Gorski
2017-07-19 12:21       ` Greg Ungerer
2017-07-18 10:17 ` [PATCH 5/9] MIPS: AR7: " Jonas Gorski
2017-07-18 10:17 ` [PATCH 6/9] MIPS: BCM63XX: " Jonas Gorski
2017-07-18 19:55   ` Florian Fainelli
2017-07-18 10:17 ` [PATCH 7/9] MIPS: Loongson 2F: " Jonas Gorski
2017-07-18 10:17 ` [PATCH 8/9] MIPS: ralink: " Jonas Gorski
2017-07-18 10:17 ` [PATCH 9/9] unicore32: " Jonas Gorski
2017-07-18 12:01 ` [PATCH 0/9] make clk_get_rate implementations behavior more consistent Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e700ebab-0fd1-f699-3b1c-d528bf003a8e@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=arnd@arndb.de \
    --cc=hsweeten@visionengravers.com \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=olof@lixom.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).