All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] ASoC: rsnd: adg: clearly handle clock error / NULL case
Date: 14 Jun 2021 07:57:32 +0900	[thread overview]
Message-ID: <87h7i1wexv.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20210611075151.GC10983@kadam>


Hi Dan

Thank you for your feedback

> > @@ -430,9 +430,9 @@ static int rsnd_adg_get_clkin(struct rsnd_priv *priv)
> >  	for (i = 0; i < CLKMAX; i++) {
> >  		clk = devm_clk_get(dev, clk_name[i]);
> >  
> > -		if (IS_ERR(clk))
> > +		if (IS_ERR_OR_NULL(clk))
> >  			clk = rsnd_adg_null_clk_get(priv);
> > -		if (IS_ERR(clk))
> > +		if (IS_ERR_OR_NULL(clk))
> 
> "clk" can't be NULL here, right?  So this should just be:
> 
> 	if (IS_ERR(clk))

clk_register_fixed_rate() might return NULL ?
I'm not sure detail.
It is indicating that "error / NULL are both error on this driver".

> (because when a function returns NULL it shouldn't print an error)

It is "from clk framework point of view" right ?
This driver doesn't assume "NULL clk" for any case.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

  reply	other threads:[~2021-06-13 22:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 23:23 [PATCH] ASoC: rsnd: adg: clearly handle clock error / NULL case Kuninori Morimoto
2021-06-11  7:51 ` Dan Carpenter
2021-06-13 22:57   ` Kuninori Morimoto [this message]
2021-08-20  4:08 Kuninori Morimoto
2021-08-20 14:39 ` Mark Brown

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=87h7i1wexv.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@oracle.com \
    /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.