Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10149012imu; Wed, 5 Dec 2018 17:20:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/X+hMXUV2mQj2xLM4PZnlyItxH74prOebNMyZfkzXltGKb7tkxBrKwR80s3WaSCmd0WiRLj X-Received: by 2002:a17:902:ab92:: with SMTP id f18mr25309463plr.221.1544059225657; Wed, 05 Dec 2018 17:20:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544059225; cv=none; d=google.com; s=arc-20160816; b=0Cvsz5odLUf1H3hnXXH0rsGuYhv2fYvjQVB7+AntCF/njQGgQC4Q7FsuYVgvRSFUVU VhBhQjYDvuSJthXQDBIuFvqVL853AlDJmYfJv8lRTO5phfrFCo0Miwx8YBGkmCV3yhOF eMR68XTHeLMMWbw33LTUgZIflH+0/oyZ/1Dpby2SRqpqCCfoDoXseFcmn6+3xlF56JpK 0F7ozw/PYF8Tf9MTgP5JOwzK4L7qvJeR+CFDm7Vyr1D+ZWcMSoiTUxuRu2eADeHpkY26 Pli/5D6aZpqGm1A1k82p3RKyt1/Gvi07XZFYFc5S/hIX/60ij+vR8vfIksadASTq+yk7 dnRA== 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=1z+IiswvYlBSMOy7+ZUHsPNV6VBBAg1LVftwEWsqyJA=; b=p/FXWy2dbnotl41QrQX+CApsG4dohyKByjrv61TGVIhwcZb7QJAuPvYPP2rNVA7Jsu blN7OKnxET+gAhPBbJfv/EtI8/WZgen/C5DS75rmG5HGMfT1UbnhZKFxdTOs9f9tAoz9 v9XuJCcMLabyIVZH+pyOn5fOYbwgWQHG4Nuz7HK+nn1Otbsak/hLH065gPwl+oAFg3cB /6P2Z8pHSJUBXv8thoqgI/bmx6oZWlNUn2zztuekNS4tbIqA1dixRwsst5iXx75N1Jkc c0G7j5B13BDJtgDAaulJiHkn7R0RGks7qjnJQuM/0d+tK3ZONSHI7c9By7LKCRbhBDWt puwQ== 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 n30si17053411pgb.406.2018.12.05.17.20.10; Wed, 05 Dec 2018 17:20:25 -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 S1728331AbeLFBT3 (ORCPT + 99 others); Wed, 5 Dec 2018 20:19:29 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:65404 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727358AbeLFBT3 (ORCPT ); Wed, 5 Dec 2018 20:19:29 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 7C3496A9E8452192936F; Thu, 6 Dec 2018 09:19:27 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wB61JM6A044245; Thu, 6 Dec 2018 09:19:22 +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 2018120609194970-15007981 ; Thu, 6 Dec 2018 09:19:49 +0800 From: Wen Yang To: Alessandro Rubini Cc: linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, Wen Yang Subject: [PATCH] drivers/fmc: Remove unnecessary NULL check before debugfs_remove_recursive Date: Thu, 6 Dec 2018 09:19:17 +0800 Message-Id: <20181206011917.32154-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:19:50, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-12-06 09:19:11 Content-Transfer-Encoding: quoted-printable X-MAIL: mse01.zte.com.cn wB61JM6A044245 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: Alessandro Rubini CC: linux-kernel@vger.kernel.org --- drivers/fmc/fmc-debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/fmc/fmc-debug.c b/drivers/fmc/fmc-debug.c index 32930722770c..ab868a35e221 100644 --- a/drivers/fmc/fmc-debug.c +++ b/drivers/fmc/fmc-debug.c @@ -168,6 +168,5 @@ int fmc=5Fdebug=5Finit(struct fmc=5Fdevice *fmc) =20 void fmc=5Fdebug=5Fexit(struct fmc=5Fdevice *fmc) { - if (fmc->dbg=5Fdir) - debugfs=5Fremove=5Frecursive(fmc->dbg=5Fdir); + debugfs=5Fremove=5Frecursive(fmc->dbg=5Fdir); } --=20 2.19.1