All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] clocksource/drivers: Add timer-of common init routine
Date: Fri, 23 Jun 2017 10:44:06 +0000	[thread overview]
Message-ID: <20170623104405.GA29841@elgon.mountain> (raw)

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

             reply	other threads:[~2017-06-23 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 10:44 Dan Carpenter [this message]
2017-06-23 10:51 ` [bug report] clocksource/drivers: Add timer-of common init routine Daniel Lezcano

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=20170623104405.GA29841@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.