Re: [PATCH v4] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-06 Thread Markus Elfring
>>> 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

Re: [PATCH v4] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-06 Thread Qiujun Huang
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

Re: [PATCH v4] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-06 Thread Michael Ellerman
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 :

[PATCH v4] powerpc/powernv: add NULL check after kzalloc in opal_add_one_export

2020-04-06 Thread Qiujun Huang
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.