linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Colin King <colin.king@canonical.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ASoC: rsnd: check for zero node count
Date: 03 Jun 2021 07:19:20 +0900	[thread overview]
Message-ID: <87im2vj4ev.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20210602112135.GF1955@kadam>


Hi

> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > The call to rsnd_node_count can potentially return a zero node count
> > so add a check for this corner case. (Note that the two other calls
> > to rsnd_node_count in the kernel perform this check, so I think it
> > justifies adding this). This avoids using a zero nr in a devm_kcalloc
> > call.
> 
> I don't have a problem with the patch, but really the code works fine
> as is.  A better commit message is:
> 
>   Most callers of_get_child_count() check that "nr" is non-zero so it
>   causes a static checker warning when we don't do that here.  This
>   doesn't cause a problem or a crash, but having zero SSUIes (What's
>   plural of ssui?) doesn't make sense either so let's add a check.

For the code

	Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>


Thank you for your help !!

Best regards
---
Kuninori Morimoto

  reply	other threads:[~2021-06-02 22:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 10:37 [PATCH][next] ASoC: rsnd: check for zero node count Colin King
2021-06-02 11:21 ` Dan Carpenter
2021-06-02 22:19   ` Kuninori Morimoto [this message]
2021-06-03 10:44   ` Colin Ian King

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=87im2vj4ev.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 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).