From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946597AbcBRPZN (ORCPT ); Thu, 18 Feb 2016 10:25:13 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34009 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946164AbcBRPZL (ORCPT ); Thu, 18 Feb 2016 10:25:11 -0500 Date: Thu, 18 Feb 2016 20:55:39 +0530 From: Bhaktipriya Shridhar To: Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman , Dmitry Eremin , Bhumika Goyal , Julia Lawall , Cihangir Akturk , Joe Perches Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check Message-ID: <20160218152539.GA28252@Karyakshetra> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NULL check before the debugfs_remove_recursive function is not needed. This was detected using scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Bhaktipriya Shridhar --- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 1913f3e..2045621 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -454,8 +454,7 @@ out: int class_procfs_clean(void) { - if (debugfs_lustre_root != NULL) - debugfs_remove_recursive(debugfs_lustre_root); + debugfs_remove_recursive(debugfs_lustre_root); debugfs_lustre_root = NULL; -- 2.1.4