[PATCH] cxl: Fix memory allocation failure test
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Mon Oct 31 17:16:46 AEDT 2016
On 31/10/16 06:35, Christophe JAILLET wrote:
> 'cxl_context_alloc()' does not return an error pointer. It is just a
> shortcut for a call to 'kzalloc' with 'sizeof(struct cxl_context)' as the
> size parameter.
>
> So its return value should be compared with NULL.
> While fixing it, simplify a bit the code.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> ---
> un-compiled because I don't have the required cross build environment.
Compiles on my system!
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Linuxppc-dev
mailing list