cxl: Fix memory allocation failure test

Michael Ellerman patch-notifications at ellerman.id.au
Tue Nov 22 11:34:19 AEDT 2016


On Sun, 2016-10-30 at 19:35:57 UTC, 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>
> Acked-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> Acked-by: Ian Munsie <imunsie at au1.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/5cd4f5cec2374d2c09299211d2b357

cheers


More information about the Linuxppc-dev mailing list