Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760054AbcJaGQ5 (ORCPT ); Mon, 31 Oct 2016 02:16:57 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50641 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759994AbcJaGQy (ORCPT ); Mon, 31 Oct 2016 02:16:54 -0400 Subject: Re: [PATCH] cxl: Fix memory allocation failure test To: Christophe JAILLET , imunsie@au1.ibm.com, fbarrat@linux.vnet.ibm.com References: <20161030193557.23862-1-christophe.jaillet@wanadoo.fr> Cc: kernel-janitors@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Andrew Donnellan Date: Mon, 31 Oct 2016 17:16:46 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161030193557.23862-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16103106-0052-0000-0000-000001E127FB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16103106-0053-0000-0000-00000718A448 Message-Id: <99cf0e87-a130-446b-0628-9fba55098dda@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-31_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610310111 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 653 Lines: 20 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 Reviewed-by: Andrew Donnellan > --- > un-compiled because I don't have the required cross build environment. Compiles on my system! -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnellan@au1.ibm.com IBM Australia Limited