Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756240AbcKBQp5 (ORCPT ); Wed, 2 Nov 2016 12:45:57 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34897 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755593AbcKBQp4 (ORCPT ); Wed, 2 Nov 2016 12:45:56 -0400 Subject: Re: [PATCH] cxl: Fix memory allocation failure test To: Christophe JAILLET , imunsie@au1.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: Frederic Barrat Date: Wed, 2 Nov 2016 17:45:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/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: 8bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110216-0020-0000-0000-0000026E5164 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110216-0021-0000-0000-00003ED9CC9D Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-02_06:,, 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-1611020312 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 450 Lines: 15 Le 30/10/2016 ? 20:35, Christophe JAILLET a ?crit : > '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 > --- Acked-by: Frederic Barrat