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

From: Markus Elfring
Date: Mon Apr 06 2020 - 08:00:32 EST


>>> 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 found by coccinelle.

Please omit this line after the addition for the reference to the SmPL script.


>>> Generated by: scripts/coccinelle/null/kmerr.cocci
â
>>> Reviewed-by: Oliver O'Halloran <oohall@xxxxxxxxx>

I wonder about this tag because of requested changes for the shown patch approach.

I recommend to add the tag âFixesâ.


>> Thanks for putting up with all the review comments :)

This seems to become challenging here.


>> But I think this should actually be two patches now.
â

> Get that, I'll separate them.

I wonder why it was not directly tried in this patch version.


>>> v3->v4:

I suggest to apply a shorter version numbering format (without an arrow).

Regards,
Markus