All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	oder_chiou-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	bardliao-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org
Subject: Re: [alsa-devel] [PATCH] ASoC: rt5659: Add mclk controls
Date: Thu, 28 Jul 2016 13:51:08 -0700	[thread overview]
Message-ID: <20160728205107.GA6804@Asurada-Nvidia> (raw)
In-Reply-To: <579A6DCC.6060401-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>

On Thu, Jul 28, 2016 at 10:40:44PM +0200, Lars-Peter Clausen wrote:
> > +	/* Check if MCLK provided */
> > +	rt5659->mclk = devm_clk_get(&i2c->dev, "mclk");
> > +	if (IS_ERR(rt5659->mclk)) {
> > +		if (PTR_ERR(rt5659->mclk) == -EPROBE_DEFER)
> > +			return -EPROBE_DEFER;
> 
> The correct thing to do here is to check if != -ENOENT and then return
> the error code. Otherwise you silently ignore errors if a clock was
> specified, but there was an error requesting it.

Oh..Thanks for the input. Will refine it in v2.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: broonie@kernel.org, mark.rutland@arm.com, oder_chiou@realtek.com,
	alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	lgirdwood@gmail.com, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, bardliao@realtek.com
Subject: Re: [alsa-devel] [PATCH] ASoC: rt5659: Add mclk controls
Date: Thu, 28 Jul 2016 13:51:08 -0700	[thread overview]
Message-ID: <20160728205107.GA6804@Asurada-Nvidia> (raw)
In-Reply-To: <579A6DCC.6060401@metafoo.de>

On Thu, Jul 28, 2016 at 10:40:44PM +0200, Lars-Peter Clausen wrote:
> > +	/* Check if MCLK provided */
> > +	rt5659->mclk = devm_clk_get(&i2c->dev, "mclk");
> > +	if (IS_ERR(rt5659->mclk)) {
> > +		if (PTR_ERR(rt5659->mclk) == -EPROBE_DEFER)
> > +			return -EPROBE_DEFER;
> 
> The correct thing to do here is to check if != -ENOENT and then return
> the error code. Otherwise you silently ignore errors if a clock was
> specified, but there was an error requesting it.

Oh..Thanks for the input. Will refine it in v2.

  parent reply	other threads:[~2016-07-28 20:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 23:02 [PATCH] ASoC: rt5659: Add mclk controls Nicolin Chen
2016-07-27 23:02 ` Nicolin Chen
     [not found] ` <1469660568-3511-1-git-send-email-nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-28 15:57   ` Mark Brown
2016-07-28 15:57     ` Mark Brown
     [not found]     ` <20160728155732.GG11806-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-07-28 18:14       ` Nicolin Chen
2016-07-28 18:14         ` Nicolin Chen
2016-07-28 18:55         ` Mark Brown
2016-07-28 18:55           ` Mark Brown
2016-07-28 19:03           ` Nicolin Chen
2016-07-29 16:15           ` Vinod Koul
2016-07-29 16:39             ` Mark Brown
     [not found]               ` <20160729163933.GJ10376-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-07-29 16:55                 ` [alsa-devel] " Vinod Koul
2016-07-29 16:55                   ` Vinod Koul
2016-08-10 13:57               ` Pierre-Louis Bossart
2016-08-10 13:57                 ` [alsa-devel] " Pierre-Louis Bossart
2016-08-10 17:06                 ` Mark Brown
2016-08-10 17:06                   ` [alsa-devel] " Mark Brown
2016-08-10 17:31                   ` Pierre-Louis Bossart
2016-08-10 17:31                     ` [alsa-devel] " Pierre-Louis Bossart
2016-08-10 17:52                     ` Mark Brown
2016-08-10 17:52                       ` [alsa-devel] " Mark Brown
2016-08-10 21:59                       ` Pierre-Louis Bossart
     [not found]                         ` <ff13c01a-a3f5-b11f-c342-926e98f64be3-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-08-11 11:34                           ` Mark Brown
2016-08-11 11:34                             ` Mark Brown
2016-07-28 20:40   ` Lars-Peter Clausen
2016-07-28 20:40     ` Lars-Peter Clausen
     [not found]     ` <579A6DCC.6060401-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2016-07-28 20:51       ` Nicolin Chen [this message]
2016-07-28 20:51         ` Nicolin Chen

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=20160728205107.GA6804@Asurada-Nvidia \
    --to=nicoleotsuka-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=bardliao-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=oder_chiou-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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.