lkml.org 
[lkml]   [2017]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/9] blackfin: bf609: allow NULL clock for clk_get_rate
2017-07-18 19:17 GMT+09:00 Jonas Gorski <jonas.gorski@gmail.com>:
> 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: 969003152aa9 ("blackfin: bf60x: add clock support")
> Cc: Steven Miao <realmz6@gmail.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>

This Cc can be replaced with

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Thank you.


> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: adi-buildroot-devel@lists.sourceforge.net
> Cc: linux-kernel@vger.kernel.org
> Reported-by: Mathias Kresin <dev@kresin.me>
> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
> ---
> arch/blackfin/mach-bf609/clock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/blackfin/mach-bf609/clock.c b/arch/blackfin/mach-bf609/clock.c
> index 392a59b9a504..21a0ec18829f 100644
> --- a/arch/blackfin/mach-bf609/clock.c
> +++ b/arch/blackfin/mach-bf609/clock.c
> @@ -109,7 +109,7 @@ EXPORT_SYMBOL(clk_disable);
> unsigned long clk_get_rate(struct clk *clk)
> {
> unsigned long ret = 0;
> - if (clk->ops && clk->ops->get_rate)
> + if (clk && clk->ops && clk->ops->get_rate)
> ret = clk->ops->get_rate(clk);
> return ret;
> }
> --
> 2.11.0
>



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-07-18 20:54    [W:0.095 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site