>>> Here needs a NULL check as kzalloc may fail returning NULL.
I find this wording potentially confusing.
* Such function calls will usually succeed to return a pointer.
* The desired memory allocation can fail.
* Please choose an imperative wording for the change description.
>>> Issue was
On Mon, Apr 6, 2020 at 6:30 PM Michael Ellerman wrote:
>
> Qiujun Huang writes:
> > Here needs a NULL check as kzalloc may fail returning NULL.
> >
> > Issue was found by coccinelle.
> > Generated by: scripts/coccinelle/null/kmerr.cocci
> >
> > Signed-off-by: Qiujun Huang
> > Reviewed-by: Oliver
Qiujun Huang writes:
> Here needs a NULL check as kzalloc may fail returning NULL.
>
> Issue was found by coccinelle.
> Generated by: scripts/coccinelle/null/kmerr.cocci
>
> Signed-off-by: Qiujun Huang
> Reviewed-by: Oliver O'Halloran
>
> ---
Thanks for putting up with all the review comments :
Here needs a NULL check as kzalloc may fail returning NULL.
Issue was found by coccinelle.
Generated by: scripts/coccinelle/null/kmerr.cocci
Signed-off-by: Qiujun Huang
Reviewed-by: Oliver O'Halloran
---
v3->v4:
Added the information about coccinelle script.
Added change log.