kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [bug report] bus: ti-sysc: Add handling for clkctrl opt clocks
Date: Thu, 17 May 2018 22:03:05 +0000	[thread overview]
Message-ID: <20180517220305.GA77025@atomide.com> (raw)
In-Reply-To: <20180517124514.GA9149@mwanda>

* Tony Lindgren <tony@atomide.com> [180517 07:03]:
> * Dan Carpenter <dan.carpenter@oracle.com> [180517 12:47]:
> >    143          ddata->clocks[index] = devm_clk_get(ddata->dev, name);
> >    144          if (IS_ERR(ddata->clocks[index])) {
> >    145                  if (PTR_ERR(ddata->clocks[index]) = -ENOENT)
> >    146                          return 0;
> >    147  
> >    148                  dev_err(ddata->dev, "clock get error for %s: %li\n",
> >    149                          name, PTR_ERR(ddata->clocks[index]));
> >    150  
> > 
> > Should we set ddata->clocks[index] = NULL on this path?
> 
> Maybe yeah. At least if clk_prepare later on fails we want to set it to
> either to NULL or error to prevent clk_enable() being called on a failed
> clock.

Looks like no need, we're bailing out of the probe anyways on errors.
And the clock_enable/disable calls do IS_ERR_OR_NULL(ddata->clocks[i]).

I'll send out the fix shortly.

Regards,

Tony

      parent reply	other threads:[~2018-05-17 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 12:45 [bug report] bus: ti-sysc: Add handling for clkctrl opt clocks Dan Carpenter
2018-05-17 14:03 ` Tony Lindgren
2018-05-17 22:03 ` Tony Lindgren [this message]

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=20180517220305.GA77025@atomide.com \
    --to=tony@atomide.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 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).