lkml.org 
[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] ASoC: rsnd: check for zero node count

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

\
 
 \ /
  Last update: 2021-06-03 00:20    [W:0.052 / U:1.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site