public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] clocksource/drivers: Add timer-of common init routine
@ 2017-06-23 10:44 Dan Carpenter
  2017-06-23 10:51 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-06-23 10:44 UTC (permalink / raw)
  To: kernel-janitors

Hello Daniel Lezcano,

The patch dc11bae78529: "clocksource/drivers: Add timer-of common
init routine" from Jun 5, 2017, leads to the following static checker
warning:

	drivers/clocksource/timer-of.c:160 timer_of_init()
	error: uninitialized symbol 'ret'.

drivers/clocksource/timer-of.c
   131  int __init timer_of_init(struct device_node *np, struct timer_of *to)
   132  {
   133          int ret;
   134          int flags = 0;
   135  
   136          if (to->flags & TIMER_OF_BASE) {
   137                  ret = timer_base_init(np, &to->of_base);
   138                  if (ret)
   139                          goto out_fail;
   140                  flags |= TIMER_OF_BASE;
   141          }
   142  
   143          if (to->flags & TIMER_OF_CLOCK) {
   144                  ret = timer_clk_init(np, &to->of_clk);
   145                  if (ret)
   146                          goto out_fail;
   147                  flags |= TIMER_OF_CLOCK;
   148          }
   149  
   150          if (to->flags & TIMER_OF_IRQ) {
   151                  ret = timer_irq_init(np, &to->of_irq);
   152                  if (ret)
   153                          goto out_fail;
   154                  flags |= TIMER_OF_IRQ;
   155          }
   156  
   157          if (!to->clkevt.name)
   158                  to->clkevt.name = np->name;
   159  out:
   160          return ret;
                ^^^^^^^^^^
Presumably one of the TIMER_OF_IRQ flags is always set, but there are no
callers so it's hard to tell.

   161  
   162  out_fail:
   163          if (flags & TIMER_OF_IRQ)
   164                  timer_irq_exit(&to->of_irq);
   165  
   166          if (flags & TIMER_OF_CLOCK)
   167                  timer_clk_exit(&to->of_clk);
   168  



regards,
dan carpenter

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

* Re: [bug report] clocksource/drivers: Add timer-of common init routine
  2017-06-23 10:44 [bug report] clocksource/drivers: Add timer-of common init routine Dan Carpenter
@ 2017-06-23 10:51 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2017-06-23 10:51 UTC (permalink / raw)
  To: kernel-janitors

On 23/06/2017 12:44, Dan Carpenter wrote:
> Hello Daniel Lezcano,
> 
> The patch dc11bae78529: "clocksource/drivers: Add timer-of common
> init routine" from Jun 5, 2017, leads to the following static checker
> warning:
> 
> 	drivers/clocksource/timer-of.c:160 timer_of_init()
> 	error: uninitialized symbol 'ret'.

Hi Dan,

the error has been fixed:

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=timers/core&id·dcc4eacc45263ac5d3a0bd78c64e9ff7c94c13

Thanks for reporting the issue.

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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-06-23 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-23 10:44 [bug report] clocksource/drivers: Add timer-of common init routine Dan Carpenter
2017-06-23 10:51 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox