Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10140999imu; Wed, 5 Dec 2018 17:10:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/W8wovjo1MF8K6xG6etDF5uUZiSkWemVQJ2MPLJZysfxHlNcRZ9Bvouke/3zRQpv43sZz+9 X-Received: by 2002:a17:902:292b:: with SMTP id g40mr26754098plb.82.1544058631142; Wed, 05 Dec 2018 17:10:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544058631; cv=none; d=google.com; s=arc-20160816; b=PTiz0YSkyi/roKd6d1djETKfnWwa52HONJC6RA8jsoE/30kmyA3QIGwgcQTepymbEo fruoo9ydYH9uBlv/gOqKgCcUeTrlgPaIWsOtO7Rn1XZxlmwhex0gB3nRz8Ql5njIE6N8 0TUZCKemv016Gyuo7WIEaq9GbZnaX1S6LmQIfEoFhwF7AvzX1zqh6+7pZX+0sSwwK6Q9 bRdXovZ3hI6EOGqygz0qspuv9aXr9p+JUWAr6w4uifSTqE0MfuXq9fSdM9NJtuRo+Cxd UOp0EKE+ZpgROQwI9JyRMc8NbWJ1BOaEIGZ9wJa33tIaovBDYdHWgLYmJ4q94Na6rk6h ydTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=UDhT1W+MQRhxib/ZZF8AtrabBOsS8I3sPdU27Cy+2+U=; b=cPUoKm2XCMnxKvbSe27PCnslFJ/MyU2Jkk/3ifBolEebkwa/2vgjvO72RQObIZx1yR O0dw95kz23AYzrr9QeU+nVkPP7N6KtbMXlyRD9VAixBOjKSPrA4oF4crhAWs3avYiQv3 LeAFW58O3W/z6kT+tdjEfq/zd6vm1Cd1XXA2qdy2pAnMEkjirodQzGNexiuaY5xDDN2L fFobv6QxcRDFNDyJ309FNCYgL10CW8TjvrBzGwh4ecIKUIFxsc8qMOcnxBlkz5CO3rfT 55NemPD5Ve7D3a28lM7TsNKe1ExeadVqBsRKa4SddiOoeFKsDVfBAzwhM9pco7qnHQHz 4fdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si21635706plg.236.2018.12.05.17.10.16; Wed, 05 Dec 2018 17:10:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbeLFBJd (ORCPT + 99 others); Wed, 5 Dec 2018 20:09:33 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:7790 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbeLFBJc (ORCPT ); Wed, 5 Dec 2018 20:09:32 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 4118F4AFD19892376DF3; Thu, 6 Dec 2018 09:09:27 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wB619KFv034498; Thu, 6 Dec 2018 09:09:20 +0800 (GMT-8) (envelope-from wen.yang99@zte.com.cn) Received: from LIN-A6CB96A0603.zte.intra ([10.90.106.118]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018120609094780-15005750 ; Thu, 6 Dec 2018 09:09:47 +0800 From: Wen Yang To: Darren Hart , Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, Wen Yang Subject: [PATCH] platform/x86: intel_ips: Remove unnecessary NULL check before debugfs_remove_recursive Date: Thu, 6 Dec 2018 09:09:14 +0800 Message-Id: <20181206010914.21964-1-wen.yang99@zte.com.cn> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-12-06 09:09:48, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-12-06 09:09:09 Content-Transfer-Encoding: quoted-printable X-MAIL: mse01.zte.com.cn wB619KFv034498 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org debugfs=5Fremove=5Frecursive() accepts a NULL parameter and returns immediately, there's no need for a NULL check in the caller. This issue was detected with the help of Coccinelle. Signed-off-by: Wen Yang CC: Darren Hart CC: Andy Shevchenko CC: platform-driver-x86@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/platform/x86/intel=5Fips.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/platform/x86/intel=5Fips.c b/drivers/platform/x86/inte= l=5Fips.c index 225638a1b09e..f8175b972537 100644 --- a/drivers/platform/x86/intel=5Fips.c +++ b/drivers/platform/x86/intel=5Fips.c @@ -1300,9 +1300,7 @@ static const struct file=5Foperations ips=5Fdebugfs= =5Fops =3D { =20 static void ips=5Fdebugfs=5Fcleanup(struct ips=5Fdriver *ips) { - if (ips->debug=5Froot) - debugfs=5Fremove=5Frecursive(ips->debug=5Froot); - return; + debugfs=5Fremove=5Frecursive(ips->debug=5Froot); } =20 static void ips=5Fdebugfs=5Finit(struct ips=5Fdriver *ips) --=20 2.19.1