From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845AbcG2Ijw (ORCPT ); Fri, 29 Jul 2016 04:39:52 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:14813 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752566AbcG2Ijs (ORCPT ); Fri, 29 Jul 2016 04:39:48 -0400 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: sebott@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org Date: Fri, 29 Jul 2016 10:39:41 +0200 (CEST) From: Sebastian Ott X-X-Sender: sebott@schleppi To: Amitoj Kaur Chawla cc: gerald.schaefer@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr Subject: Re: [PATCH] s390/pci: Remove unnecessary if condition In-Reply-To: <20160729083150.GA8819@amitoj-Inspiron-3542> References: <20160729083150.GA8819@amitoj-Inspiron-3542> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) Organization: =?ISO-8859-15?Q?=22IBM_Deutschland_Research_&_Development_GmbH_=2F_Vorsitzende_des_Aufsichtsrats=3A_Martina_Koederitz_Gesch=E4ftsf=FChrung=3A_Dirk_Wittkopp_Sitz_der_Gesellschaft=3A_B=F6blingen_=2F_Registergericht?= =?ISO-8859-15?Q?=3A_Amtsgericht_Stuttgart=2C_HRB_243294=22?= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16072908-0008-0000-0000-000002A7E183 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16072908-0009-0000-0000-000019453CDB Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-29_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607290091 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Jul 2016, Amitoj Kaur Chawla wrote: > Remove unnecessary error handling because the only failure value that > can be returned is NULL and so the test can never be true. > > The Coccinelle semantic patch used to make this change is as follows: > @@ > expression e; > @@ > > e = debugfs_create_file(...); > - if(IS_ERR(e)) { e = NULL; } Nope. For !CONFIG_DEBUG_FS debugfs_create_file returns an ERR_PTR. Regards, Sebastian