Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755128AbcKVAe6 (ORCPT ); Mon, 21 Nov 2016 19:34:58 -0500 Received: from ozlabs.org ([103.22.144.67]:45141 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754050AbcKVAeV (ORCPT ); Mon, 21 Nov 2016 19:34:21 -0500 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 5cd4f5cec2374d2c09299211d2b357cc160e49a0 In-Reply-To: <20161030193557.23862-1-christophe.jaillet@wanadoo.fr> To: Christophe Jaillet , imunsie@au1.ibm.com, fbarrat@linux.vnet.ibm.com From: Michael Ellerman Cc: kernel-janitors@vger.kernel.org, Christophe JAILLET , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: cxl: Fix memory allocation failure test Message-Id: <3tN60q61rdz9t17@ozlabs.org> Date: Tue, 22 Nov 2016 11:34:19 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 669 Lines: 18 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 > Reviewed-by: Andrew Donnellan > Acked-by: Frederic Barrat > Acked-by: Ian Munsie Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/5cd4f5cec2374d2c09299211d2b357 cheers