linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()
@ 2016-01-18 19:34 Alexandre Belloni
  2016-01-19  8:33 ` Nicolas Ferre
  2016-01-19  8:49 ` Daniel Lezcano
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Belloni @ 2016-01-18 19:34 UTC (permalink / raw)
  To: linux-arm-kernel

ret is used to detect an error but it was not properly updated after
calling clk_prepare_enable() thus it made it impossible to detect an error
when enabling the slow clock.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/clocksource/timer-atmel-st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksource/timer-atmel-st.c
index 29d21d68df5a..c69070c6ad91 100644
--- a/drivers/clocksource/timer-atmel-st.c
+++ b/drivers/clocksource/timer-atmel-st.c
@@ -225,7 +225,7 @@ static void __init atmel_st_timer_init(struct device_node *node)
 	if (IS_ERR(sclk))
 		panic(pr_fmt("Unable to get slow clock\n"));
 
-	clk_prepare_enable(sclk);
+	ret = clk_prepare_enable(sclk);
 	if (ret)
 		panic(pr_fmt("Could not enable slow clock\n"));
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()
  2016-01-18 19:34 [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable() Alexandre Belloni
@ 2016-01-19  8:33 ` Nicolas Ferre
  2016-01-19  8:49 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2016-01-19  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

Le 18/01/2016 20:34, Alexandre Belloni a ?crit :
> ret is used to detect an error but it was not properly updated after
> calling clk_prepare_enable() thus it made it impossible to detect an error
> when enabling the slow clock.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  drivers/clocksource/timer-atmel-st.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksource/timer-atmel-st.c
> index 29d21d68df5a..c69070c6ad91 100644
> --- a/drivers/clocksource/timer-atmel-st.c
> +++ b/drivers/clocksource/timer-atmel-st.c
> @@ -225,7 +225,7 @@ static void __init atmel_st_timer_init(struct device_node *node)
>  	if (IS_ERR(sclk))
>  		panic(pr_fmt("Unable to get slow clock\n"));
>  
> -	clk_prepare_enable(sclk);
> +	ret = clk_prepare_enable(sclk);

Yes, sure...
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks!


>  	if (ret)
>  		panic(pr_fmt("Could not enable slow clock\n"));
>  
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable()
  2016-01-18 19:34 [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable() Alexandre Belloni
  2016-01-19  8:33 ` Nicolas Ferre
@ 2016-01-19  8:49 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2016-01-19  8:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/18/2016 08:34 PM, Alexandre Belloni wrote:
> ret is used to detect an error but it was not properly updated after
> calling clk_prepare_enable() thus it made it impossible to detect an error
> when enabling the slow clock.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---

Applied thanks !

   -- Daniel


-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-19  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18 19:34 [PATCH] clocksource: atmel-st: use return value from clk_prepare_enable() Alexandre Belloni
2016-01-19  8:33 ` Nicolas Ferre
2016-01-19  8:49 ` Daniel Lezcano

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).